Trait layout_2013::traversal::PostorderFlowTraversal

source ·
pub trait PostorderFlowTraversal {
    // Required method
    fn process(&self, flow: &mut dyn Flow);

    // Provided methods
    fn should_process(&self, _flow: &mut dyn Flow) -> bool { ... }
    fn traverse(&self, flow: &mut dyn Flow) { ... }
}
Expand description

A bottom-up traversal, with a optional in-order pass.

Required Methods§

source

fn process(&self, flow: &mut dyn Flow)

The operation to perform. Return true to continue or false to stop.

Provided Methods§

source

fn should_process(&self, _flow: &mut dyn Flow) -> bool

Returns false if this node must be processed in-order. If this returns false, we skip the operation for this node, but continue processing the ancestors. This is called after child nodes are visited.

source

fn traverse(&self, flow: &mut dyn Flow)

Traverses the tree in postorder.

Implementors§