pub trait TreeNodeContainer<'a, T>: Sizedwhere
T: 'a,{
// Required methods
fn apply_elements<F>(
&'a self,
f: F,
) -> Result<TreeNodeRecursion, DataFusionError>
where F: FnMut(&'a T) -> Result<TreeNodeRecursion, DataFusionError>;
fn map_elements<F>(self, f: F) -> Result<Transformed<Self>, DataFusionError>
where F: FnMut(T) -> Result<Transformed<T>, DataFusionError>;
}Expand description
TreeNodeContainer contains elements that a function can be applied on or mapped.
The elements of the container are siblings so the continuation rules are similar to
TreeNodeRecursion::visit_sibling / Transformed::transform_sibling.
Required Methods§
Sourcefn apply_elements<F>(
&'a self,
f: F,
) -> Result<TreeNodeRecursion, DataFusionError>
fn apply_elements<F>( &'a self, f: F, ) -> Result<TreeNodeRecursion, DataFusionError>
Applies f to all elements of the container.
This method is usually called from TreeNode::apply_children implementations as
a node is actually a container of the node’s children.
Sourcefn map_elements<F>(self, f: F) -> Result<Transformed<Self>, DataFusionError>
fn map_elements<F>(self, f: F) -> Result<Transformed<Self>, DataFusionError>
Maps all elements of the container with f.
This method is usually called from TreeNode::map_children implementations as
a node is actually a container of the node’s children.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".