def resource_transient

bendvy-ecs-core@0.1.0.3 · ordinary_schema.bend:85

import bendvy-ecs-core@0.1.0.3/ordinary_schema.bend as OrdinarySchema
import Base
import bendvy-ecs-core@0.1.0.3/persistence_declaration.bend as Persist
import bendvy-ecs-core@0.1.0.3/ordinary_declaration.bend as Component
import bendvy-ecs-core@0.1.0.3/schema_fragments.bend as Fragment

85# Declare a resource with transient persistence classification from its bound
86# extension. Records the classification and derives the owner type; does not
87# execute codecs, validate input, allocate payloads or export a snapshot.
88# Use the matching persistence declaration and identity when composing a schema.
89def resource_transient(~S:Data,~P:Type,~identity:Component.Declaration<S,P>,extension:Persist.Transient<S,P,identity>) -> Schema<S,Unit,P>:
90  +key=Component.key(~S,~P,identity)
91  Schema{[Fragment.Classified{Fragment.Resource{},key,key,Fragment.Transient{}}]}

Uses (9)

Used by (0)

No other definition uses this definition.