pub enum TreeErrorType<Ix = DefaultIndexType> {
InvalidNodeIndex {
node: NodeIndex<Ix>,
},
ExpectedRootNode {
node: NodeIndex<Ix>,
},
ExpectedNonAncestorNode {
new_ancestor: NodeIndex<Ix>,
new_descendant: NodeIndex<Ix>,
},
OtherError {
msg: String,
},
}
Expand description
Enum to refer to error situations that commonly occur in forest operations.
Variants§
InvalidNodeIndex
A node index was passed to an operation but did not refer to a valid node.
ExpectedRootNode
An operation is only defined for root nodes, but an invalid node index or a node index referring to a non-tree node was passed to the operation.
ExpectedNonAncestorNode
An operation is only defined for forest nodes that are not part of the same forest tree, but the nodes passed to this operation are already in a ancestor/descendant relation.
Fields
OtherError
Summary error type, which can be used in other error situations which do not have a direct relation to defined operations of a forest.
Trait Implementations§
Source§impl<Ix: Clone> Clone for TreeErrorType<Ix>
impl<Ix: Clone> Clone for TreeErrorType<Ix>
Source§fn clone(&self) -> TreeErrorType<Ix>
fn clone(&self) -> TreeErrorType<Ix>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<Ix> Freeze for TreeErrorType<Ix>where
Ix: Freeze,
impl<Ix> RefUnwindSafe for TreeErrorType<Ix>where
Ix: RefUnwindSafe,
impl<Ix> Send for TreeErrorType<Ix>where
Ix: Send,
impl<Ix> Sync for TreeErrorType<Ix>where
Ix: Sync,
impl<Ix> Unpin for TreeErrorType<Ix>where
Ix: Unpin,
impl<Ix> UnwindSafe for TreeErrorType<Ix>where
Ix: 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