Expand description
Serializable UI declaration instruction streams and leaf-config type lists.
This module records the sequence of operations performed while building a Cotis UI
(Open, Configure,
Close, etc.) as JSON-friendly data. At replay
time, the stream is interpreted to rebuild the element tree without the original UI code.
Leaf element configs (text, images, etc.) are stored in a type-erased LeafConfigData
blob. The LeafConfigList type parameter on
LeafedInterfaceDeclaration tells the replay machinery which leaf types to try when
deserializing those blobs.
§Instruction protocol
A valid recording for one element subtree looks like:
Open → Configure(config)? → LeafConfig(leaf)? → (child subtrees)* → CloseStart and
End are optional session markers written around
a frame; they are persisted to JSON but ignored during replay.
§Stage 2 replay
LeafedInterfaceDeclaration implements UiFn for shared
references, so a loaded declaration can be passed directly to
CotisApp::compute_frame as the UI callback.
Modules§
- leaf_
serialization - Type-level lists for deserializing type-erased leaf configs at replay time.
Structs§
- Leafed
Interface Declaration - A serialized UI declaration paired with a leaf-config type list for replay.
- Leafed
Interface Instructions - One instruction paired with the leaf type list used for replay dispatch.
- Serialized
Interface Declaration - Append-only builder for a serialized UI declaration instruction stream.
Enums§
- Serializable
Interface Instructions - One step in a recorded UI declaration.