Struct compt::dfs_order::CompleteTreeContainer [−][src]
#[repr(transparent)]pub struct CompleteTreeContainer<T, D> { /* fields omitted */ }
Expand description
Container for a dfs order tree. Internally uses a Vec. Derefs to a CompleteTree.
Implementations
pub fn from_preorder(
vec: Vec<T>
) -> Result<CompleteTreeContainer<T, PreOrder>, NotCompleteTreeSizeErr>
pub fn from_inorder(
vec: Vec<T>
) -> Result<CompleteTreeContainer<T, InOrder>, NotCompleteTreeSizeErr>
pub fn from_postorder(
vec: Vec<T>
) -> Result<CompleteTreeContainer<T, PostOrder>, NotCompleteTreeSizeErr>
Cast this container into another provided X
has the same
size and alignment as T
. Panics if they do not.
Returns the underlying elements as they are, in BFS order.
Methods from Deref<Target = CompleteTree<T, D>>
Trait Implementations
type Target = CompleteTree<T, D>
type Target = CompleteTree<T, D>
The resulting type after dereferencing.
Dereferences the value.
Mutably dereferences the value.
Auto Trait Implementations
impl<T, D> RefUnwindSafe for CompleteTreeContainer<T, D> where
D: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, D> Send for CompleteTreeContainer<T, D> where
D: Send,
T: Send,
impl<T, D> Sync for CompleteTreeContainer<T, D> where
D: Sync,
T: Sync,
impl<T, D> Unpin for CompleteTreeContainer<T, D> where
D: Unpin,
impl<T, D> UnwindSafe for CompleteTreeContainer<T, D> where
D: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more