Expand description
Scene value model: builders, accessors, and fail-closed validation.
A Scene is a SIM value (an Expr tree) built from open maps tagged with a
kind symbol. This module never introduces a parallel data model; it only
provides ergonomic constructors over Expr and a validator that turns a
malformed scene into a structured SceneError (a path plus a message)
rather than a panic.
Structs§
- Scene
Budget - One total budget for producing or rendering a Scene.
- Scene
Budget State - Mutable receipt for a
SceneBudgetas scene producers spend it. - Scene
Error - A structured scene validation diagnostic: where the problem is and what it
is.
pathis a human-readable address into the scene tree (for examplenodes[0].kind);messagedescribes the violation.
Enums§
- Scene
Budget Exhausted - Reason a Scene budget refused another node.
Constants§
- HEATMAP_
BYTES_ PER_ CELL - Scalar payload bytes represented by one heatmap cell (
f64plus mask bit stored as a Rustbool). - HEATMAP_
PALETTES - Palette names accepted by the domain-neutral
scene/heatmapcontract.
Functions§
- heatmap_
payload_ bytes - Calculate the checked scalar-and-metadata payload footprint recorded in a
scene/heatmapnode. - map
- Build a plain data map from string-keyed entries (keys become
core-less symbols). Usenodeto build a tagged scene node. A map value from string-keyed entries (keys become unqualified symbols). - node
- Build a scene node: an
Expr::Mapwhose first entry iskind: scene/<name>followed byentries. - node_
kind - If
expris a map tagged with a symbolkind, return that kind symbol. - validate_
scene - Validate that
expris a well-formed scene, failing closed with aSceneErrorotherwise.