pub trait SchemaWalker {
type Output;
type Error;
// Required method
fn walk(
&mut self,
graph: &SchemaGraph,
ty: &SchemaType,
value: &SchemaValue,
) -> Result<Self::Output, Self::Error>;
}Expand description
Driver-friendly walker over a typed value tree.
Implementations focus on the actual per-shape logic; the top-level
walk function handles ref resolution and cycle protection before
dispatching back into SchemaWalker::walk on the resolved body.
Required Associated Types§
Required Methods§
Sourcefn walk(
&mut self,
graph: &SchemaGraph,
ty: &SchemaType,
value: &SchemaValue,
) -> Result<Self::Output, Self::Error>
fn walk( &mut self, graph: &SchemaGraph, ty: &SchemaType, value: &SchemaValue, ) -> Result<Self::Output, Self::Error>
Walk one (sub-)value of a given type in the context of graph.
Implementations may freely call back into walk (the free function
in this module) when they recurse into child nodes; that keeps ref
resolution centralised.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".