pub trait TreeVisitor<'a, T>{
// Required methods
fn visit(&self, tree: &'a Tree<T>, is_last: bool);
fn step_down(&self, is_last: bool);
fn step_up(&self);
}
Expand description
The TreeVisitor
trait is the visitor part of the visitor pattern.
Objects which on to get notified about a visited node while a tree structure
is traversed this trait should be implemented.