pub enum EventStoreError {
Backend(String),
Corrupted(String),
Disk(String),
HashMismatch {
seq: u64,
},
OutOfOrder {
high_watermark: u64,
seq: u64,
},
Closed,
Gap {
prev: u64,
next: u64,
missing: u64,
},
CrashedPredecessor,
}Expand description
Errors returned by event store backends, the writer, the reader, and the verifier.
The variants form a typed surface for the operational policies described in the SPEC: disk pressure halts the kernel, hash mismatch quarantines the affected run, and a crashed predecessor is sealed by the caller before a new run is opened.
Variants§
Backend(String)
A backend operation failed for a reason that does not fit any other variant.
Typically wraps a redb error or an in-memory backend invariant violation.
Corrupted(String)
A run file is structurally damaged and cannot be opened safely.
Surfaces redb header-region corruption and any backend-detected structural failure.
Disk(String)
The backing storage refused the write because of disk pressure.
Maps to redb Io(FileTooLarge) and equivalent host-level failures (ENOSPC,
RLIMIT_FSIZE). Triggers the kernel halt path; the writer fail-stops.
HashMismatch
The canonical entry hash recorded with a row does not match the recomputed hash.
Quarantines the affected run.
OutOfOrder
The writer received an entry whose sequence number is not contiguous after the current durable high-watermark.
Fields
Closed
The run is sealed and cannot accept further writes.
Gap
A reader processing seq=N+1 did not observe seq=N.
One of the four idempotency primitives: gap detection on read.
Fields
CrashedPredecessor
Opening a run found a predecessor whose status is Running and that lacks a
RunEnded entry.
The kernel is expected to seal the predecessor (as CrashedRecovered, or
Quarantined if hash check fails) and then open a new run that records the
predecessor’s run_id as parent_run_id.
Trait Implementations§
Source§impl Debug for EventStoreError
impl Debug for EventStoreError
Source§impl Display for EventStoreError
impl Display for EventStoreError
Source§impl Error for EventStoreError
impl Error for EventStoreError
1.30.0 · 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()
Source§impl From<EventStoreError> for BootError
impl From<EventStoreError> for BootError
Source§fn from(source: EventStoreError) -> Self
fn from(source: EventStoreError) -> Self
Source§impl From<EventStoreError> for CacheReplayError
impl From<EventStoreError> for CacheReplayError
Source§fn from(source: EventStoreError) -> Self
fn from(source: EventStoreError) -> Self
Source§impl From<EventStoreError> for ReplayInputError
impl From<EventStoreError> for ReplayInputError
Source§fn from(source: EventStoreError) -> Self
fn from(source: EventStoreError) -> Self
Source§impl From<EventStoreError> for VerifyError
impl From<EventStoreError> for VerifyError
Source§fn from(source: EventStoreError) -> Self
fn from(source: EventStoreError) -> Self
Auto Trait Implementations§
impl Freeze for EventStoreError
impl RefUnwindSafe for EventStoreError
impl Send for EventStoreError
impl Sync for EventStoreError
impl Unpin for EventStoreError
impl UnsafeUnpin for EventStoreError
impl UnwindSafe for EventStoreError
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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 more