pub enum RangeProofError {
NoLeavesProvided,
WrongAmountOfLeavesProvided,
InvalidRoot,
MissingLeaf,
MissingProofNode,
TreeDoesNotContainLeaf,
TreeTooLarge,
MalformedTree,
MalformedProof(&'static str),
}Expand description
An error that occurred while trying to check a claimed range proof for a merkle tree.
Variants§
NoLeavesProvided
The tree is not empty, but no leaves were provided. This proof is malformed - even proofs of absence must provide a leaf.
WrongAmountOfLeavesProvided
The proof is malformed - the number of leaves provided does not match the claimed size of the range
InvalidRoot
The claimed proof does not verify against the provided root
MissingLeaf
The claimed range was invalid because it left out a leaf
MissingProofNode
The proof is missing a node that was needed for verification
TreeDoesNotContainLeaf
A claimed leaf was not actually present in the tree
TreeTooLarge
The claimed tree exceeds the maximum allowed size (currently 2^32 leaves)
MalformedTree
Indicates that the tree is not properly ordered by namespace
MalformedProof(&'static str)
A catch all error which indicates that the proof is malformed
Trait Implementations§
Source§impl Clone for RangeProofError
impl Clone for RangeProofError
Source§fn clone(&self) -> RangeProofError
fn clone(&self) -> RangeProofError
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 RangeProofError
impl Debug for RangeProofError
Source§impl PartialEq for RangeProofError
impl PartialEq for RangeProofError
impl Copy for RangeProofError
impl StructuralPartialEq for RangeProofError
Auto Trait Implementations§
impl Freeze for RangeProofError
impl RefUnwindSafe for RangeProofError
impl Send for RangeProofError
impl Sync for RangeProofError
impl Unpin for RangeProofError
impl UnwindSafe for RangeProofError
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