Skip to main content

Module walker

Module walker 

Source
Expand description

Dynamic walker skeleton operating over (SchemaGraph, SchemaType, SchemaValue).

The walker is the single public traversal API consumed by every renderer in this module tree. It enforces the rule that a value never travels without the schema that types it; the walker resolves named crate::schema::SchemaType::Ref hops transparently and protects against reference cycles by tracking the set of currently-active type identifiers.

The same ref-resolution / cycle-protection logic is exposed as resolve_ref so decoders that consume serde_json::Value (and other non-SchemaValue inputs) can reuse it without duplicating the body of the walker.

Enums§

WalkerError
Errors raised by the walk driver. Walker-specific errors are wrapped in WalkerError::Walker.

Traits§

SchemaWalker
Driver-friendly walker over a typed value tree.

Functions§

resolve_ref
Resolve any leading SchemaType::Ref hops on ty (cycle-aware) and hand the resulting non-ref body to f. Errors raised by ref handling surface as WalkerError::RefCycle / WalkerError::DanglingRef; the caller’s own error type is wrapped in WalkerError::Walker.
walk
Drive a walker over (graph, ty, value).