pub struct Tree<T> { /* private fields */ }
Expand description
A generic tree structure, with nodes of type T
.
Implementations
sourceimpl<T> Tree<T>
impl<T> Tree<T>
sourcepub fn walk(&self) -> TreeWalker<'_, T>
pub fn walk(&self) -> TreeWalker<'_, T>
Create a tree walker to arbitrarily traverse the tree.
sourcepub fn postorder(&self) -> PostorderIter<'_, T> where
T: IndexNode,
pub fn postorder(&self) -> PostorderIter<'_, T> where
T: IndexNode,
Perform a postorder depth first traversal of the tree.
Currently has substantially more iteration overhead than postorder
,
but running time appears to stay inside an order of magnitude on large trees.
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for Tree<T> where
T: RefUnwindSafe,
impl<T> Send for Tree<T> where
T: Send,
impl<T> Sync for Tree<T> where
T: Sync,
impl<T> Unpin for Tree<T> where
T: Unpin,
impl<T> UnwindSafe for Tree<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more