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

Method apply_until_stop

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

Source from the content-addressed store, hash-verified

1184
1185impl<I: Iterator> TreeNodeIterator for I {
1186 fn apply_until_stop<F: FnMut(Self::Item) -> Result<TreeNodeRecursion>>(
1187 self,
1188 mut f: F,
1189 ) -> Result<TreeNodeRecursion> {
1190 let mut tnr = TreeNodeRecursion::Continue;
1191 for i in self {
1192 tnr = f(i)?;
1193 match tnr {
1194 TreeNodeRecursion::Continue | TreeNodeRecursion::Jump => {}
1195 TreeNodeRecursion::Stop => return Ok(TreeNodeRecursion::Stop),
1196 }
1197 }
1198 Ok(tnr)
1199 }
1200
1201 fn map_until_stop_and_collect<
1202 F: FnMut(Self::Item) -> Result<Transformed<Self::Item>>,

Callers 1

apply_childrenMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected