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
Fields
node: NodeIndex<Ix>The node index that was passed to the operation.
A node index was passed to an operation but did not refer to a valid node.
ExpectedRootNode
Fields
node: NodeIndex<Ix>The node index that was passed to operation.
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
Fields
new_ancestor: NodeIndex<Ix>The node that was passed to the operation as the new ancestor
new_descendant: NodeIndex<Ix>The node that was passed to the operation as the new descendant
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.
OtherError
Fields
msg: StringDescription of the particular error situation.
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
sourceimpl<Ix: Clone> Clone for TreeErrorType<Ix>
impl<Ix: Clone> Clone for TreeErrorType<Ix>
sourcefn clone(&self) -> TreeErrorType<Ix>
fn clone(&self) -> TreeErrorType<Ix>
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more