def component_transient

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

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/column.bend as Col
import bendvy-ecs-core@0.1.0.3/schema_fragments.bend as Fragment

61# Declare a component with transient persistence classification from its bound
62# extension. Records the classification and derives the owner type; does not
63# execute codecs, validate input, allocate payloads or export a snapshot.
64# Use the matching persistence declaration and identity when composing a schema.
65def component_transient(~S:Data,~P:Type,~identity:Component.Declaration<S,P>,extension:Persist.Transient<S,P,identity>) -> Schema<S,Col.Column<S,P>,Unit>:
66  +key=Component.key(~S,~P,identity)
67  Schema{[Fragment.Classified{Fragment.Component{},key,key,Fragment.Transient{}}]}

Uses (10)

Used by (0)

No other definition uses this definition.