pq_tree/errors.rs
1/// Reduction failure
2#[derive(Debug, Eq, PartialEq, Clone)]
3pub enum ReductionError<T> {
4 /// No leaves specified for reduction.
5 EmptyLeafSet,
6 /// The tree cannot be reduced.
7 IrreducibleTree,
8 /// Leaf not found in the tree.
9 LeafNotFound(T),
10}
11
12/// Replacement failure
13#[derive(Debug, Eq, PartialEq, Clone)]
14pub enum ReplacementError<T> {
15 /// The pertinent root isn't marked in the tree.
16 NoPertinentRoot,
17 /// Leaf is already present in the tree.
18 DuplicateLeaf(T),
19 /// Leaf not found in the tree.
20 LeafNotFound(T),
21}