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§

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.

Functions§

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.