pub enum Error {
Io(Error),
BadMeta(String),
NotRetained {
seq: u64,
first: u64,
},
BeyondHead {
seq: u64,
head: u64,
},
Corrupt {
path: PathBuf,
offset: u64,
what: &'static str,
},
Released(PathBuf),
OutOfOrder {
got: u64,
expected: u64,
},
Follower,
Unexpected(PathBuf),
Poisoned {
dir: PathBuf,
cause: String,
},
}Expand description
Errors of the log.
Variants§
Io(Error)
I/O.
BadMeta(String)
A frame’s meta did not parse.
NotRetained
The requested sequence is below what the log retains.
BeyondHead
The requested sequence is above the head.
Corrupt
A frame in the middle of a segment (not the tail) is corrupt.
Released(PathBuf)
The log’s files are RELEASED (Log::release): the data set under it is being grown
and unmounted, so nothing may write until Log::reacquire.
OutOfOrder
An append was asked to start at a sequence that is not head + 1.
Follower
This log belongs to a TWIN: it holds the primary’s numbers and originates none. A local mutation on a twin is refused here, loudly, rather than stealing a sequence number from the primary.
Unexpected(PathBuf)
The segment directory holds a file the layout does not describe.
Poisoned
The log is POISONED (stinky rows 3 and 6, 2026-10-10): a frame’s fdatasync failed,
or the cut of a half-written frame did. After a failed fsync the kernel may have dropped
the dirty pages and the NEXT fsync succeeds without them (fsyncgate) — a frame its writer
was told had failed would then be published by the next leader and applied by the twin.
After a failed cut the next frame would land behind garbage. So nothing more is written:
every append refuses with this until the log is reopened, which recovers from the last
durable frame.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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 !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> ErrorExt for T
impl<T> ErrorExt for T
Source§fn raise_typed(self) -> Exn<Self>where
Self: Sized,
fn raise_typed(self) -> Exn<Self>where
Self: Sized,
Self even when it is already an Error.Source§fn and_raise_typed<T>(self, context: T) -> Exn<T>
fn and_raise_typed<T>(self, context: T) -> Exn<T>
Self::and_raise(), retaining the context’s type in an exception.Source§fn raise_erased(self) -> Exnwhere
Self: Sized,
fn raise_erased(self) -> Exnwhere
Self: Sized,
crate::Error values reuse their existing frame and caller location.