Expand description
Validation utilities for the in-memory schema model.
Three core validators, each with its own error type:
well_formedness::validate_graph— structural integrity of asuper::SchemaGraph(no duplicate type ids, no dangling refs, non-empty discriminated sums, well-formed scalar constraints, etc.).value::validate_value— asuper::SchemaValuestructurally conforms to a givensuper::SchemaTypeinside a graph.subtyping::is_assignable— width / depth / scalar-narrowing subtyping with cycle detection oversuper::SchemaType::Ref.
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
SchemaValuematches a givenSchemaTypeinside aSchemaGraph. - well_
formedness - Structural well-formedness checks for a
SchemaGraph.
Structs§
- Value
Path - Path through a
SchemaValuetree to a specific failing node.
Enums§
- Schema
Error - All structural errors that can be raised by
validate_graph. - Value
Error - All errors raised by
validate_value. - Value
Path Segment - A path segment inside a
SchemaValuetree.
Functions§
- is_
assignable - Is
subassignable tosupinsidegraph? - is_
equivalent_ cross_ graph - Structural type equivalence across two (possibly different) graphs.
- validate_
graph - Validate a
SchemaGraphfor structural well-formedness. - validate_
root_ type - Validate a single
SchemaTypeas a root against an existing graph’s definitions for structural well-formedness. - validate_
value - Validate that
valuestructurally conforms toty(in the context ofgraph).