Skip to main content

TreeNodeContainer

Trait TreeNodeContainer 

Source
pub trait TreeNodeContainer<'a, T>: Sized
where 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§

Source

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.

Source

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".

Implementations on Foreign Types§

Source§

impl<'a, T, C0, C1, C2, C3> TreeNodeContainer<'a, T> for (C0, C1, C2, C3)
where T: 'a, C0: TreeNodeContainer<'a, T>, C1: TreeNodeContainer<'a, T>, C2: TreeNodeContainer<'a, T>, C3: TreeNodeContainer<'a, T>,

Source§

impl<'a, T, C0, C1, C2> TreeNodeContainer<'a, T> for (C0, C1, C2)
where T: 'a, C0: TreeNodeContainer<'a, T>, C1: TreeNodeContainer<'a, T>, C2: TreeNodeContainer<'a, T>,

Source§

impl<'a, T, C0, C1> TreeNodeContainer<'a, T> for (C0, C1)
where T: 'a, C0: TreeNodeContainer<'a, T>, C1: TreeNodeContainer<'a, T>,

Source§

impl<'a, T, C> TreeNodeContainer<'a, T> for Arc<C>
where T: 'a, C: TreeNodeContainer<'a, T> + Clone + Default,

Source§

impl<'a, T, C> TreeNodeContainer<'a, T> for Box<C>
where T: 'a, C: TreeNodeContainer<'a, T> + Default,

Source§

impl<'a, T, C> TreeNodeContainer<'a, T> for Option<C>
where T: 'a, C: TreeNodeContainer<'a, T>,

Source§

impl<'a, T, C> TreeNodeContainer<'a, T> for Vec<C>
where T: 'a, C: TreeNodeContainer<'a, T>,

Source§

impl<'a, T, K, C> TreeNodeContainer<'a, T> for HashMap<K, C>
where T: 'a, K: Eq + Hash, C: TreeNodeContainer<'a, T>,

Implementors§