Skip to main content

Module model

Module model 

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

SceneBudget
One total budget for producing or rendering a Scene.
SceneBudgetState
Mutable receipt for a SceneBudget as scene producers spend it.
SceneError
A structured scene validation diagnostic: where the problem is and what it is. path is a human-readable address into the scene tree (for example nodes[0].kind); message describes the violation.

Enums§

SceneBudgetExhausted
Reason a Scene budget refused another node.

Constants§

HEATMAP_BYTES_PER_CELL
Scalar payload bytes represented by one heatmap cell (f64 plus mask bit stored as a Rust bool).
HEATMAP_PALETTES
Palette names accepted by the domain-neutral scene/heatmap contract.

Functions§

heatmap_payload_bytes
Calculate the checked scalar-and-metadata payload footprint recorded in a scene/heatmap node.
map
Build a plain data map from string-keyed entries (keys become core-less symbols). Use node to build a tagged scene node. A map value from string-keyed entries (keys become unqualified symbols).
node
Build a scene node: an Expr::Map whose first entry is kind: scene/<name> followed by entries.
node_kind
If expr is a map tagged with a symbol kind, return that kind symbol.
validate_scene
Validate that expr is a well-formed scene, failing closed with a SceneError otherwise.