Enum datafusion::common::tree_node::TreeNodeRecursion
source · 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.
Implementations§
source§impl TreeNodeRecursion
impl TreeNodeRecursion
sourcepub fn visit_children<F>(
self,
f: F,
) -> Result<TreeNodeRecursion, DataFusionError>
pub fn visit_children<F>( self, f: F, ) -> Result<TreeNodeRecursion, DataFusionError>
Continues visiting nodes with f
depending on the current TreeNodeRecursion
value and the fact that f
is visiting the current node’s children.
sourcepub fn visit_sibling<F>(
self,
f: F,
) -> Result<TreeNodeRecursion, DataFusionError>
pub fn visit_sibling<F>( self, f: F, ) -> Result<TreeNodeRecursion, DataFusionError>
Continues visiting nodes with f
depending on the current TreeNodeRecursion
value and the fact that f
is visiting the current node’s sibling.
sourcepub fn visit_parent<F>(self, f: F) -> Result<TreeNodeRecursion, DataFusionError>
pub fn visit_parent<F>(self, f: F) -> Result<TreeNodeRecursion, DataFusionError>
Continues visiting nodes with f
depending on the current TreeNodeRecursion
value and the fact that f
is visiting the current node’s parent.
Trait Implementations§
source§impl Clone for TreeNodeRecursion
impl Clone for TreeNodeRecursion
source§fn clone(&self) -> TreeNodeRecursion
fn clone(&self) -> TreeNodeRecursion
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more