#[non_exhaustive]pub enum StoreError {
Predecessor {
operation: String,
message: String,
},
Value(ValueError),
BadParent {
id: u64,
parent: u64,
},
UnknownState(u64),
VarCount {
expected: usize,
found: usize,
},
}Expand description
An error from state storage.
Apart from StoreError::Predecessor (native I/O/allocation/corruption) and
StoreError::Value, which carries the value layer’s TLC-format error
(a state that cannot be fingerprinted or encoded, as in TLC), every variant is an
internal invariant violation: a bug in the caller or in dive-store, reported with
enough context to reproduce it.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Predecessor
Native predecessor storage failed; never a model verdict.
Fields
Value(ValueError)
A value could not be fingerprinted, encoded or decoded.
BadParent
A trace-log parent that is not an earlier state.
UnknownState(u64)
A state id that the trace log does not contain.
VarCount
A state fingerprinted with a variable order over another number of variables.
Implementations§
Trait Implementations§
Source§impl Clone for StoreError
impl Clone for StoreError
Source§impl Debug for StoreError
impl Debug for StoreError
Source§impl Display for StoreError
impl Display for StoreError
impl Eq for StoreError
Source§impl Error for StoreError
impl Error for StoreError
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<ValueError> for StoreError
impl From<ValueError> for StoreError
Source§fn from(e: ValueError) -> Self
fn from(e: ValueError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for StoreError
impl PartialEq for StoreError
impl StructuralPartialEq for StoreError
Auto Trait Implementations§
impl Forget for StoreError
impl Freeze for StoreError
impl Move for StoreError
impl RefUnwindSafe for StoreError
impl Send for StoreError
impl Sync for StoreError
impl Unpin for StoreError
impl UnsafeUnpin for StoreError
impl UnwindSafe for StoreError
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