[][src]Enum read_tree::BuildError

pub enum BuildError<T> {
    Incomplete(Sapling<T>),
    MultipleRoots(Sapling<T>),
}

An error returned when attempting to build a Sapling<T>.

The error contains the sapling that failed to build in order to return it to the caller. Otherwise the build function would drop the sapling without returning a resulting Tree<T>.

Variants

Incomplete(Sapling<T>)

The sapling is incomplete and not ready to be built.

It is either empty or there are still unclosed nodes. Use pop_all to close any unclosed nodes and use is_empty to check if th sapling is empty.

MultipleRoots(Sapling<T>)

The sapling contains more than one root node.

When creating nodes on a sapling it is possible to pop the root node and push a second root. Trees however must have a unique root.

To get an iterator over the root nodes build the sapling into a PolyTree<T> using build_polytree.

Trait Implementations

impl<T> Display for BuildError<T>[src]

impl<T> Debug for BuildError<T>[src]

impl<T> Error for BuildError<T>[src]

Auto Trait Implementations

impl<T> Send for BuildError<T> where
    T: Send

impl<T> Sync for BuildError<T> where
    T: Sync

impl<T> Unpin for BuildError<T> where
    T: Unpin

impl<T> UnwindSafe for BuildError<T> where
    T: UnwindSafe

impl<T> RefUnwindSafe for BuildError<T> where
    T: RefUnwindSafe

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]