pub enum BuildError<T> {
Incomplete(Sapling<T>),
MultipleRoots(Sapling<T>),
}
Expand description
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§
Source§impl<T> Debug for BuildError<T>
impl<T> Debug for BuildError<T>
Source§impl<T> Display for BuildError<T>
impl<T> Display for BuildError<T>
Source§impl<T> Error for BuildError<T>
impl<T> Error for BuildError<T>
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl<T> Freeze for BuildError<T>
impl<T> RefUnwindSafe for BuildError<T>where
T: RefUnwindSafe,
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,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more