#[non_exhaustive]pub enum JournalError {
Io {
message: String,
path: Option<PathBuf>,
},
CorruptEntry {
sequence: u64,
expected_crc: u32,
actual_crc: u32,
},
DeserializationError {
sequence: u64,
message: String,
},
SerializationError {
message: String,
},
EntryTooLarge {
entry_bytes: usize,
segment_size: usize,
},
InvalidDirectory {
path: PathBuf,
},
MutexPoisoned,
SequenceNotFound {
sequence: u64,
},
InvalidEntryHeader {
offset: usize,
message: String,
},
}Expand description
Errors that can occur within the journal subsystem.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Io
An I/O error occurred while reading or writing journal files.
Fields
CorruptEntry
A journal entry failed CRC32 integrity verification.
Fields
DeserializationError
The journal entry payload could not be deserialized.
Fields
SerializationError
The journal entry payload could not be serialized.
EntryTooLarge
A segment file is too small to hold the entry being appended.
Fields
InvalidDirectory
The journal directory does not exist or is not accessible.
MutexPoisoned
An internal mutex was poisoned (another thread panicked while holding the lock).
SequenceNotFound
The requested sequence number was not found in the journal.
InvalidEntryHeader
The journal entry has an invalid header (truncated or malformed).
Trait Implementations§
Source§impl Debug for JournalError
impl Debug for JournalError
Source§impl Display for JournalError
impl Display for JournalError
Source§impl Error for JournalError
impl Error for JournalError
1.30.0 · 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()
Source§impl From<Error> for JournalError
impl From<Error> for JournalError
Source§impl From<JournalError> for ReplayError
impl From<JournalError> for ReplayError
Source§fn from(source: JournalError) -> Self
fn from(source: JournalError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for JournalError
impl RefUnwindSafe for JournalError
impl Send for JournalError
impl Sync for JournalError
impl Unpin for JournalError
impl UnsafeUnpin for JournalError
impl UnwindSafe for JournalError
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
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> 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> ⓘ
Converts
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> ⓘ
Converts
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