pub enum MerkleTreeError {
ParametersError(String),
NotFound,
ExistingLeaf,
ForgottenLeaf,
ExceedCapacity,
DigestError(String),
InconsistentStructureError(String),
}
Expand description
Error type for Merkle tree
Variants§
ParametersError(String)
Parameters error, {0}
NotFound
Queried leaf isn’t in this Merkle tree
ExistingLeaf
Queried leaf is already occupied.
ForgottenLeaf
Queried leaf is forgotten.
ExceedCapacity
Merkle tree is already full.
DigestError(String)
Digest error, {0}
InconsistentStructureError(String)
Inconsistent Structure error, {0}
Trait Implementations§
Source§impl Debug for MerkleTreeError
impl Debug for MerkleTreeError
Source§impl Display for MerkleTreeError
impl Display for MerkleTreeError
Source§impl Error for MerkleTreeError
impl Error for MerkleTreeError
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 From<Poseidon2Error> for MerkleTreeError
impl From<Poseidon2Error> for MerkleTreeError
Source§fn from(err: Poseidon2Error) -> Self
fn from(err: Poseidon2Error) -> Self
Converts to this type from the input type.
Source§impl From<RescueError> for MerkleTreeError
impl From<RescueError> for MerkleTreeError
Source§fn from(err: RescueError) -> Self
fn from(err: RescueError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for MerkleTreeError
impl PartialEq for MerkleTreeError
impl Eq for MerkleTreeError
impl StructuralPartialEq for MerkleTreeError
Auto Trait Implementations§
impl Freeze for MerkleTreeError
impl RefUnwindSafe for MerkleTreeError
impl Send for MerkleTreeError
impl Sync for MerkleTreeError
impl Unpin for MerkleTreeError
impl UnwindSafe for MerkleTreeError
Blanket Implementations§
§impl<T> AsErrorSource for Twhere
T: Error + 'static,
impl<T> AsErrorSource for Twhere
T: Error + 'static,
§fn as_error_source(&self) -> &(dyn Error + 'static)
fn as_error_source(&self) -> &(dyn Error + 'static)
For maximum effectiveness, this needs to be called as a method
to benefit from Rust’s automatic dereferencing of method
receivers.
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more