pub enum NodeSwapError {
NodeIdxError(NodeIdxError),
FirstNodeIsAncestorOfSecond,
SecondNodeIsAncestorOfFirst,
}
Expand description
Error variants that can be observed while swapping two subtrees rooted at two nodes of the tree.
Variantsยง
NodeIdxError(NodeIdxError)
At least one of the indices of the roots of the two subtrees is invalid.
FirstNodeIsAncestorOfSecond
The first node is an ancestor of the second node; and hence, the subtrees intersect. The subtrees must be independent to have a valid swap operation.
SecondNodeIsAncestorOfFirst
The second node is an ancestor of the first node; and hence, the subtrees intersect. The subtrees must be independent to have a valid swap operation.
Trait Implementationsยง
Sourceยงimpl Clone for NodeSwapError
impl Clone for NodeSwapError
Sourceยงfn clone(&self) -> NodeSwapError
fn clone(&self) -> NodeSwapError
Returns a duplicate 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 moreSourceยงimpl Debug for NodeSwapError
impl Debug for NodeSwapError
Sourceยงimpl From<NodeIdxError> for NodeSwapError
impl From<NodeIdxError> for NodeSwapError
Sourceยงfn from(value: NodeIdxError) -> Self
fn from(value: NodeIdxError) -> Self
Converts to this type from the input type.
Sourceยงimpl PartialEq for NodeSwapError
impl PartialEq for NodeSwapError
impl Copy for NodeSwapError
impl StructuralPartialEq for NodeSwapError
Auto Trait Implementationsยง
impl Freeze for NodeSwapError
impl RefUnwindSafe for NodeSwapError
impl Send for NodeSwapError
impl Sync for NodeSwapError
impl Unpin for NodeSwapError
impl UnwindSafe for NodeSwapError
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