pub trait RoseTree<V>: Sized {
// Required methods
fn is_leaf(&self) -> bool;
fn is_branch(&self) -> bool;
fn size(&self) -> usize;
fn destructure(self) -> (V, Vec<Self>);
fn add_child(self, child: V) -> Self;
}Required Methods§
fn is_leaf(&self) -> bool
fn is_branch(&self) -> bool
Sourcefn destructure(self) -> (V, Vec<Self>)
fn destructure(self) -> (V, Vec<Self>)
Pull a tree apart into its head node, and an iterator over any children.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.