pub trait ExprVisitor {
type Error;
// Required method
fn pre_visit(&mut self, plan: &Expr) -> Result<bool, Self::Error>;
// Provided method
fn post_visit(&mut self, _plan: &Expr) -> Result<bool, Self::Error> { ... }
}
Expand description
Trait that implements the Visitor pattern
for a depth first walk on Expr AST. pre_visit
is called
before any children are visited, and then post_visit
is called
after all children have been visited. Only pre_visit
is required.