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.