Enum akd::errors::HistoryTreeNodeError[][src]

pub enum HistoryTreeNodeError {
Show 16 variants NoDirectionInSettingChild(u64u64), DirectionIsNone, NoChildInTreeAtEpoch(u64usize), NoChildrenInTreeAtEpoch(u64), InvalidEpochForUpdatingHash(u64), TriedToUpdateParentOfRoot, ParentNextEpochInvalid(u64), HashUpdateOnlyAllowedAfterNodeInsertion, TriedToHashLeafChildren, NodeCreatedWithoutEpochs(u64), LeafNodeLabelLenLessThanInterior(NodeLabel), CompressionError(NodeLabel), NodeDidNotExistAtEp(NodeLabelu64), NodeDidNotHaveExistingStateAtEp(NodeLabelu64), StorageError(StorageError), SerializationError,
}
Expand description

Errors thown by HistoryTreeNodes

Variants

NoDirectionInSettingChild(u64u64)

Tuple Fields

0: u64
1: u64

Tried to set a child and the direction given was none.

DirectionIsNone

Direction is unexpectedly None

NoChildInTreeAtEpoch(u64usize)

Tuple Fields

0: u64
1: usize

The node didn’t have a child in the given epoch

NoChildrenInTreeAtEpoch(u64)

Tuple Fields

0: u64

The node had no children at the given epoch

InvalidEpochForUpdatingHash(u64)

Tuple Fields

0: u64

The hash was being updated for an invalid epoch

TriedToUpdateParentOfRoot

Tried to update the parent of the root, which should not be done

ParentNextEpochInvalid(u64)

Tuple Fields

0: u64

The next epoch of this node’s parent was invalid

HashUpdateOnlyAllowedAfterNodeInsertion

The hash of a parent was attempted to be updated, without setting the calling node as a child.

TriedToHashLeafChildren

The children of a leaf are always dummy and should not be hashed

NodeCreatedWithoutEpochs(u64)

Tuple Fields

0: u64

The list of epochs for a given node was empty

LeafNodeLabelLenLessThanInterior(NodeLabel)

Tuple Fields

The label of a leaf node was shorter than that of an interior node.

CompressionError(NodeLabel)

Tuple Fields

Error compressing the Merkle trie

NodeDidNotExistAtEp(NodeLabelu64)

Tuple Fields

1: u64

Tried to access something about the node at an epoch that didn’t exist.

NodeDidNotHaveExistingStateAtEp(NodeLabelu64)

Tuple Fields

1: u64

The state of a node did not exist at a given epoch

StorageError(StorageError)

Tuple Fields

Error propogation

SerializationError

Error propogation

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.