Skip to main content

Module validation

Module validation 

Source
Expand description

Validation utilities for the in-memory schema model.

Three core validators, each with its own error type:

These validators are pure in-memory checks. They do not depend on the generated WIT bindings under super::wit.

Modules§

subtyping
Depth subtyping with semantic-scalar narrowing.
value
Structural validation that a SchemaValue matches a given SchemaType inside a SchemaGraph.
well_formedness
Structural well-formedness checks for a SchemaGraph.

Structs§

ValuePath
Path through a SchemaValue tree to a specific failing node.

Enums§

SchemaError
All structural errors that can be raised by validate_graph.
ValueError
All errors raised by validate_value.
ValuePathSegment
A path segment inside a SchemaValue tree.

Functions§

is_assignable
Is sub assignable to sup inside graph?
is_equivalent_cross_graph
Structural type equivalence across two (possibly different) graphs.
validate_graph
Validate a SchemaGraph for structural well-formedness.
validate_root_type
Validate a single SchemaType as a root against an existing graph’s definitions for structural well-formedness.
validate_value
Validate that value structurally conforms to ty (in the context of graph).