Trait layout_2013::traversal::PreorderFlowTraversal

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

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

A top-down traversal.

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_subtree(&self, _flow: &mut dyn Flow) -> bool

Returns true if this node should be processed and false if neither this node nor its descendants should be processed.

source

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

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

source

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

Traverses the tree in preorder.

source

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

Traverse the Absolute flow tree in preorder.

Traverse all your direct absolute descendants, who will then traverse their direct absolute descendants.

Return true if the traversal is to continue or false to stop.

Implementors§