pub enum Error<F: Family> {
Show 21 variants
NonLeaf(Position<F>),
PositionOverflow(Position<F>),
LocationOverflow(Location<F>),
Empty,
RangeOutOfBounds(Location<F>),
InvalidSize(u64),
LeafOutOfBounds(Location<F>),
ElementPruned(Position<F>),
InvalidPinnedNodes,
StaleBatch {
expected: Position<F>,
actual: Position<F>,
},
AncestorDropped {
expected: Position<F>,
actual: Position<F>,
},
InvalidProof,
RootMismatch,
MissingDigest(Position<F>),
Metadata(Error),
Journal(Error),
Runtime(Error),
MissingNode(Position<F>),
DataCorrupted(&'static str),
MissingGraftedLeaf(Position<F>),
BitOutOfBounds(u64, u64),
}Expand description
Errors that can occur when interacting with a Merkle-family data structure.
Variants§
NonLeaf(Position<F>)
The position does not correspond to a leaf node.
PositionOverflow(Position<F>)
The position exceeds the valid range.
LocationOverflow(Location<F>)
The location exceeds the valid range.
Empty
The range is empty but must contain at least one element.
RangeOutOfBounds(Location<F>)
The end of a range is out of bounds.
InvalidSize(u64)
The requested size is invalid.
LeafOutOfBounds(Location<F>)
A requested leaf location exceeds the current leaf count.
ElementPruned(Position<F>)
A required node was not available (e.g. pruned).
InvalidPinnedNodes
The provided pinned node list does not match the expected pruning boundary.
StaleBatch
Structure has diverged incompatibly from the batch’s ancestor chain.
Fields
AncestorDropped
An ancestor batch was dropped before this batch was applied, causing data loss. All ancestors must be kept alive until descendants are applied.
Fields
InvalidProof
The proof is invalid.
RootMismatch
The root does not match the computed root.
MissingDigest(Position<F>)
A required digest is missing.
Metadata(Error)
A metadata error occurred.
Journal(Error)
A journal error occurred.
Runtime(Error)
A runtime error occurred.
MissingNode(Position<F>)
A required node is missing.
DataCorrupted(&'static str)
Data is corrupted.
MissingGraftedLeaf(Position<F>)
A required grafted leaf digest is missing.
BitOutOfBounds(u64, u64)
Bit offset is out of bounds.
Trait Implementations§
Source§impl<F: Family> Error for Error<F>
impl<F: Family> Error for Error<F>
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl<F> Freeze for Error<F>
impl<F> !RefUnwindSafe for Error<F>
impl<F> Send for Error<F>
impl<F> Sync for Error<F>
impl<F> Unpin for Error<F>where
F: Unpin,
impl<F> UnsafeUnpin for Error<F>
impl<F> !UnwindSafe for Error<F>
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
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.