Enum akd::errors::TreeNodeError
source · pub enum TreeNodeError {
InvalidDirection(usize),
NoDirection(NodeLabel, Option<NodeLabel>),
NoChildAtEpoch(u64, usize),
ParentNextEpochInvalid(u64),
HashUpdateOrderInconsistent,
NonexistentAtEpoch(NodeLabel, u64),
NoStateAtEpoch(NodeLabel, u64),
DigestDeserializationFailed(String),
}
Expand description
Errors thrown by TreeNodes
Variants
InvalidDirection(usize)
At the moment the only supported dirs are 0, 1
NoDirection(NodeLabel, Option<NodeLabel>)
No direction provided for the node. Second parameter is the label of the child attempted to be set – if there is one, otherwise it is None.
NoChildAtEpoch(u64, usize)
The node didn’t have a child in the given epoch
ParentNextEpochInvalid(u64)
The next epoch of this node’s parent was invalid
HashUpdateOrderInconsistent
The hash of a parent was attempted to be updated, without setting the calling node as a child.
NonexistentAtEpoch(NodeLabel, u64)
The node did not exist at epoch
NoStateAtEpoch(NodeLabel, u64)
The state of a node did not exist at a given epoch
DigestDeserializationFailed(String)
Failed to deserialize a digest
Trait Implementations
sourceimpl Debug for TreeNodeError
impl Debug for TreeNodeError
sourceimpl Display for TreeNodeError
impl Display for TreeNodeError
sourceimpl Error for TreeNodeError
impl Error for TreeNodeError
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
sourceimpl From<TreeNodeError> for AkdError
impl From<TreeNodeError> for AkdError
sourcefn from(error: TreeNodeError) -> Self
fn from(error: TreeNodeError) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<TreeNodeError> for TreeNodeError
impl PartialEq<TreeNodeError> for TreeNodeError
sourcefn eq(&self, other: &TreeNodeError) -> bool
fn eq(&self, other: &TreeNodeError) -> bool
impl Eq for TreeNodeError
impl StructuralEq for TreeNodeError
impl StructuralPartialEq for TreeNodeError
Auto Trait Implementations
impl RefUnwindSafe for TreeNodeError
impl Send for TreeNodeError
impl Sync for TreeNodeError
impl Unpin for TreeNodeError
impl UnwindSafe for TreeNodeError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.