def resource

bendvy-ecs-core@0.1.0.4 · ordinary_schema_dump.bend:33

import bendvy-ecs-core@0.1.0.4/ordinary_schema_dump.bend as OrdinarySchemaDump
import Base
import bendvy-ecs-core@0.1.0.4/ordinary_schema.bend as Schema
import bendvy-ecs-core@0.1.0.4/ordinary_schema_provision.bend as Ordinary

33# Declare a resource dump leaf with owner-preserving presentation.
34# show returns the same owner type with text, without copying affine payloads.
35# Arbitrary caller callbacks remain trusted; no rollback is added.
36def resource(~S:Data,~P:Type,~show:P -> P & String,declaration:Schema.Resource<S,P>) -> Provision<S,Unit,P,Ordinary.resource_empty,Ordinary.resource_count(~S),resource_components,resource_read(~P,~show)>:
37  Provision{Ordinary.resource(~S,~P,declaration)}

Uses (10)

Used by (1)