pub enum WalError {
Show 15 variants
Io(Error),
ChecksumMismatch {
lsn: u64,
expected: u32,
actual: u32,
},
CheckpointCorrupt {
path: String,
detail: String,
},
InvalidMagic {
offset: u64,
expected: u32,
actual: u32,
},
UnsupportedVersion {
version: u16,
supported: u16,
},
UnknownRequiredRecordType {
record_type: u32,
lsn: u64,
},
PayloadTooLarge {
size: usize,
max: usize,
},
Sealed,
AlignmentViolation {
context: &'static str,
required: usize,
actual: usize,
},
LockPoisoned {
context: &'static str,
},
EncryptionError {
detail: String,
},
DwbOffNotOpenable,
CorruptRecord {
lsn: u64,
detail: String,
},
InvalidPayload {
detail: String,
},
Unsupported {
detail: &'static str,
},
}Expand description
Errors produced by the WAL subsystem.
Variants§
Io(Error)
I/O error from the underlying file operations.
ChecksumMismatch
CRC32C checksum mismatch during read/replay.
CheckpointCorrupt
Checkpoint frame is corrupt: bad version, truncated payload, or CRC mismatch.
InvalidMagic
Record header has an invalid magic number — file is corrupted or not a WAL.
UnsupportedVersion
WAL format version is not supported by this binary.
UnknownRequiredRecordType
Unknown required record type encountered during replay. Optional unknown record types are safely skipped.
PayloadTooLarge
Write payload exceeds maximum record size.
Sealed
Attempted to write to a WAL that has been closed or is in error state.
AlignmentViolation
Alignment violation — O_DIRECT requires aligned buffers and offsets.
LockPoisoned
A mutex was poisoned (another thread panicked while holding the lock).
EncryptionError
Encryption or decryption failed.
DwbOffNotOpenable
DoubleWriteBuffer::open was called with DwbMode::Off. Callers
that want the DWB disabled must not call open at all.
CorruptRecord
Record payload failed structural validation (truncation, bad length
prefix, invalid UTF-8, etc.). Distinct from WalError::ChecksumMismatch
— the bytes passed CRC but the payload’s own framing is wrong.
InvalidPayload
Record payload is structurally invalid at parse time, before the surrounding LSN context is known (e.g., anchor payload decoded from a byte slice during unit-level use).
Unsupported
Operation is not supported on the current platform (e.g. wasm32).
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)>
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 WalError
impl !UnwindSafe for WalError
impl Freeze for WalError
impl Send for WalError
impl Sync for WalError
impl Unpin for WalError
impl UnsafeUnpin for WalError
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.