pub enum StoreError {
Backend(String),
ChainBroken {
stream: String,
writer: String,
seq: u64,
detail: String,
},
NonMonotonicGeneration {
key: String,
current: u64,
attempted: u64,
},
MalformedRow(String),
}Expand description
Errors raised by the store substrate.
Backend-specific failures (rusqlite, and later postgres) are flattened
into StoreError::Backend with a stringified detail, so callers never
have to match on a backend’s concrete error type — the substrate is the
boundary.
Variants§
Backend(String)
A backend (SQLite / Postgres) returned an error.
ChainBroken
A crate::WriterLog chain failed verification — the log has been
reordered, truncated, or tampered with.
NonMonotonicGeneration
A generation counter was asked to move backwards. Generations are monotonic by contract — wall-clock time is never a coordination primitive here.
MalformedRow(String)
A stored value had an unexpected shape (e.g. a hash column that was not exactly 32 bytes).
Trait Implementations§
Source§impl Debug for StoreError
impl Debug for StoreError
Source§impl Display for StoreError
impl Display 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()
Auto Trait Implementations§
impl Freeze 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