MCPcopy Create free account
hub / github.com/apache/datafusion / apply_ref_elements

Method apply_ref_elements

datafusion/common/src/tree_node.rs:1081–1094  ·  view source on GitHub ↗
(
        &self,
        mut f: F,
    )

Source from the content-addressed store, hash-verified

1079
1080impl<'a, T: 'a, C: TreeNodeContainer<'a, T>> TreeNodeRefContainer<'a, T> for Vec<&'a C> {
1081 fn apply_ref_elements<F: FnMut(&'a T) -> Result<TreeNodeRecursion>>(
1082 &self,
1083 mut f: F,
1084 ) -> Result<TreeNodeRecursion> {
1085 let mut tnr = TreeNodeRecursion::Continue;
1086 for c in self {
1087 tnr = c.apply_elements(&mut f)?;
1088 match tnr {
1089 TreeNodeRecursion::Continue | TreeNodeRecursion::Jump => {}
1090 TreeNodeRecursion::Stop => return Ok(TreeNodeRecursion::Stop),
1091 }
1092 }
1093 Ok(tnr)
1094 }
1095}
1096
1097impl<'a, T: 'a, C0: TreeNodeContainer<'a, T>, C1: TreeNodeContainer<'a, T>>

Callers 3

apply_childrenMethod · 0.80
apply_childrenMethod · 0.80
apply_expressionsMethod · 0.80

Calls 2

visit_siblingMethod · 0.80
apply_elementsMethod · 0.45

Tested by

no test coverage detected