pub enum WalError {
Io(Error),
ChecksumMismatch {
lsn: u64,
expected: u32,
actual: u32,
},
InvalidMagic {
offset: u64,
expected: u32,
actual: u32,
},
UnsupportedVersion {
version: u16,
supported: u16,
},
UnknownRequiredRecordType {
record_type: u16,
lsn: u64,
},
PayloadTooLarge {
size: usize,
max: usize,
},
Sealed,
AlignmentViolation {
context: &'static str,
required: usize,
actual: usize,
},
LockPoisoned {
context: &'static str,
},
EncryptionError {
detail: String,
},
}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.
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.
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