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§
Provided Methods§
sourcefn should_process_subtree(&self, _flow: &mut dyn Flow) -> bool
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.
sourcefn should_process(&self, _flow: &mut dyn Flow) -> bool
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.
sourcefn traverse_absolute_flows(&self, flow: &mut dyn Flow)
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.