Skip to main content

validate_scene

Function validate_scene 

Source
pub fn validate_scene(expr: &Expr) -> Result<(), SceneError>
Expand description

Validate that expr is a well-formed scene, failing closed with a SceneError otherwise.

The root must be a scene node (a map tagged with a recognized scene/<kind> symbol). Nested maps that carry a kind key are validated as scene nodes too; maps without a kind key are treated as plain data and only recursed into. This keeps the metadata open (arbitrary data may ride along) while still rejecting a map that claims to be a scene node but is not one.