pub enum TreeNodeRecursion {
Continue,
Jump,
Stop,
}
Expand description
Controls how TreeNode
recursions should proceed.
Variants§
Continue
Continue recursion with the next node.
Jump
In top-down traversals, skip recursing into children but continue with the next node, which actually means pruning of the subtree.
In bottom-up traversals, bypass calling bottom-up closures till the next leaf node.
In combined traversals, if it is the f_down
(pre-order) phase, execution
“jumps” to the next f_up
(post-order) phase by shortcutting its children.
If it is the f_up
(post-order) phase, execution “jumps” to the next f_down
(pre-order) phase by shortcutting its parent nodes until the first parent node
having unvisited children path.
Stop
Stop recursion.
Trait Implementations§
source§impl Clone for TreeNodeRecursion
impl Clone for TreeNodeRecursion
source§fn clone(&self) -> TreeNodeRecursion
fn clone(&self) -> TreeNodeRecursion
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for TreeNodeRecursion
impl Debug for TreeNodeRecursion
source§impl PartialEq for TreeNodeRecursion
impl PartialEq for TreeNodeRecursion
source§fn eq(&self, other: &TreeNodeRecursion) -> bool
fn eq(&self, other: &TreeNodeRecursion) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for TreeNodeRecursion
impl StructuralPartialEq for TreeNodeRecursion
Auto Trait Implementations§
impl Freeze for TreeNodeRecursion
impl RefUnwindSafe for TreeNodeRecursion
impl Send for TreeNodeRecursion
impl Sync for TreeNodeRecursion
impl Unpin for TreeNodeRecursion
impl UnwindSafe for TreeNodeRecursion
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more