pub enum QuorumTreeError {
DuplicateChild {
canonical_id: String,
},
UnsatisfiableQuorum {
quorum_size: u64,
num_children: usize,
},
}Expand description
An error returned when building an invalid QuorumTree.
Both cases are caller bugs: a correct quorum rule never contains the same child twice and never requires more children than it has. Construction reports them instead of repairing the input, so the mistake surfaces where it is made.
Variants§
DuplicateChild
The same child node was given more than once.
UnsatisfiableQuorum
quorum_size exceeds the number of child nodes, so no input could
satisfy the tree.
Trait Implementations§
Source§impl Clone for QuorumTreeError
impl Clone for QuorumTreeError
Source§fn clone(&self) -> QuorumTreeError
fn clone(&self) -> QuorumTreeError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 QuorumTreeError
impl Debug for QuorumTreeError
Source§impl Display for QuorumTreeError
impl Display for QuorumTreeError
impl Eq for QuorumTreeError
Source§impl Error for QuorumTreeError
impl Error for QuorumTreeError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for QuorumTreeError
impl PartialEq for QuorumTreeError
Source§fn eq(&self, other: &QuorumTreeError) -> bool
fn eq(&self, other: &QuorumTreeError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for QuorumTreeError
Auto Trait Implementations§
impl Freeze for QuorumTreeError
impl RefUnwindSafe for QuorumTreeError
impl Send for QuorumTreeError
impl Sync for QuorumTreeError
impl Unpin for QuorumTreeError
impl UnsafeUnpin for QuorumTreeError
impl UnwindSafe for QuorumTreeError
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