pub trait TreeNodeIterator: Iterator {
// Required methods
fn apply_until_stop<F>(
self,
f: F,
) -> Result<TreeNodeRecursion, DataFusionError>
where F: FnMut(Self::Item) -> Result<TreeNodeRecursion, DataFusionError>;
fn map_until_stop_and_collect<F>(
self,
f: F,
) -> Result<Transformed<Vec<Self::Item>>, DataFusionError>
where F: FnMut(Self::Item) -> Result<Transformed<Self::Item>, DataFusionError>;
}Expand description
Transformation helper to process a sequence of iterable tree nodes that are siblings.
Required Methods§
sourcefn apply_until_stop<F>(self, f: F) -> Result<TreeNodeRecursion, DataFusionError>
fn apply_until_stop<F>(self, f: F) -> Result<TreeNodeRecursion, DataFusionError>
Apples f to each item in this iterator
Visits all items in the iterator unless
f returns an error or f returns TreeNodeRecursion::Stop.
§Returns
Error if f returns an error or Ok(TreeNodeRecursion) from the last invocation
of f or Continue if the iterator is empty
sourcefn map_until_stop_and_collect<F>(
self,
f: F,
) -> Result<Transformed<Vec<Self::Item>>, DataFusionError>
fn map_until_stop_and_collect<F>( self, f: F, ) -> Result<Transformed<Vec<Self::Item>>, DataFusionError>
Apples f to each item in this iterator
Visits all items in the iterator unless
f returns an error or f returns TreeNodeRecursion::Stop.
§Returns
Error if f returns an error
Ok(Transformed) such that:
transformedis true if any return fromfhad transformed truedatafrom the last invocation offtnrfrom the last invocation offorContinueif the iterator is empty
Object Safety§
This trait is not object safe.