pub trait NodeVisitor<D: LayoutDom + ?Sized> {
type Stop;
// Provided methods
fn enter(
&mut self,
_dom: &D,
_id: D::NodeId,
) -> ControlFlow<Self::Stop, Descent> { ... }
fn exit(&mut self, _dom: &D, _id: D::NodeId) -> ControlFlow<Self::Stop> { ... }
}Expand description
Visitor over a LayoutDom. Methods return ControlFlow so the visitor
can bail early with a typed Stop value. Use type Stop = () for plain
“stop or not”; use core::convert::Infallible to assert the walk never
terminates early; use a typed error type to carry per-node-failure data
out of the walk.
Required Associated Types§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".