Skip to main content

Module serialize_targets

Module serialize_targets 

Source
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)* → Close

Start 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§

LeafedInterfaceDeclaration
A serialized UI declaration paired with a leaf-config type list for replay.
LeafedInterfaceInstructions
One instruction paired with the leaf type list used for replay dispatch.
SerializedInterfaceDeclaration
Append-only builder for a serialized UI declaration instruction stream.

Enums§

SerializableInterfaceInstructions
One step in a recorded UI declaration.