pub trait DynTreeNode {
    // Required methods
    fn arc_children(&self) -> Vec<Arc<Self>>;
    fn with_new_arc_children(
        &self,
        arc_self: Arc<Self>,
        new_children: Vec<Arc<Self>>
    ) -> Result<Arc<Self>>;
}
Expand description

Helper trait for implementing TreeNode that have children stored as Arc’s

If some trait object, such as dyn T, implements this trait, its related Arc<dyn T> will automatically implement TreeNode

Required Methods§

source

fn arc_children(&self) -> Vec<Arc<Self>>

Returns all children of the specified TreeNode

source

fn with_new_arc_children( &self, arc_self: Arc<Self>, new_children: Vec<Arc<Self>> ) -> Result<Arc<Self>>

construct a new self with the specified children

Implementors§