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 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 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