Trait rasslib::tree::TreeVisitor [] [src]

pub trait TreeVisitor<'a, T> where T: Display + PartialEq + Clone {
    fn visit(&self, tree: &'a Tree<T>, is_last: bool);
    fn step_down(&self, is_last: bool);
    fn step_up(&self);
}

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.

Required Methods

fn visit(&self, tree: &'a Tree<T>, is_last: bool)

fn step_down(&self, is_last: bool)

fn step_up(&self)

Implementors