pub enum WalError {
Io(Error),
Encode(String),
Decode(String),
CrcMismatch {
lsn: Lsn,
expected: u32,
actual: u32,
},
Truncated {
expected: usize,
actual: usize,
},
UnknownKind(u8),
BadSegmentHeader(&'static str),
Malformed(String),
AlreadyOpen {
dir: PathBuf,
},
Poisoned,
}Expand description
Failure modes for WAL operations.
Errors from the append path are surfaced through [WalSink::append] /
[WalSink::commit] / [WalSink::flush] (defined in wal.rs, not yet
implemented). Errors from replay are surfaced through WalReplay. The
distinction matters because a recorder error needs to poison the
engine’s mutex critical section, whereas a replay error happens at
boot, before queries are accepted.
Variants§
Io(Error)
Encode(String)
Decode(String)
CrcMismatch
Truncated
UnknownKind(u8)
BadSegmentHeader(&'static str)
Malformed(String)
AlreadyOpen
Poisoned
Trait Implementations§
Source§impl Error for WalError
impl Error for WalError
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 WalError
impl !RefUnwindSafe for WalError
impl Send for WalError
impl Sync for WalError
impl Unpin for WalError
impl UnsafeUnpin for WalError
impl !UnwindSafe for WalError
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