Expand description
Native Rust structural visiting.
Two public layers mirror the C++ API split:
Dispatcher+structural_visit— handlers drive recursion through an explicitStructuralVisitorViewcontext. Pass state belongs on the dispatcher;visitor.visit(self, &child)reborrows it for recursive calls. Unmatched values use default child traversal.structural_walk— dispatcher or closure observers steer engine-owned recursion throughWalkResult(advance, skip, interrupt).
Both layers thread definition-region state explicitly. Walk handlers opt in
with a trailing DefRegionKind; visit handlers read it from their context
and may override it for a child through StructuralVisitorView::with_def_region_kind.
Re-exports§
pub use super::dispatch::ByWalkDispatch;pub use super::dispatch::DispatchWalker;
Structs§
- Compose a concrete default-descent base with an owned or borrowed dispatcher.
- Exact C++ StructuralVisitorObj ABI prefix.
- Recursive visiting and default child descent for a dispatcher.
- Interrupt state of a traversal, mirroring C++
ffi.VisitInterrupt.
Enums§
- Definition-region state active at the current value.
- Callback order for
structural_walk. - What a callback asks the Rust walker to do with the current value.
Traits§
- Conversion into a dispatcher-driven visitor. Closures belong to structural_walk.
- Convert either an infallible or fallible typed handler result.
- Conversion into the walker argument of
structural_walk. - A concrete base that customizes default descent.
- One link in a first-match
structural_walkcallback chain.
Functions§
- Visit
rootwith an owned or borrowedDispatcher. - Walk
rootwith an observer, the Rust analog of C++StructuralWalk<order>(root, callbacks...).