pub enum DbError {
Io(Error),
LogFull,
Corrupt,
NotFound,
Unsupported(&'static str),
}Expand description
The unified error type for all DonaDbX operations.
All public methods return DbResult<T>, which is an alias for
Result<T, DbError>.
Variants§
Io(Error)
An underlying OS I/O error (file open, mmap, read, write, rename, …).
LogFull
The active log has no remaining capacity for the requested write.
This should not occur under normal operation because the segment
manager rotates the log before it reaches capacity. If it does occur,
increase Config::buffer_size or lower Config::rotate_threshold.
Corrupt
A log record’s magic number or length fields are invalid.
This may indicate file corruption or an incomplete write from a previous crash. The crash-recovery path stops scanning at the first corrupt record, so partial trailing writes are safe.
NotFound
The requested key does not exist in any committed log or sealed segment.
Unsupported(&'static str)
A requested feature or configuration value is not supported.
The attached &'static str identifies which feature was requested.
Trait Implementations§
Source§impl Error for DbError
impl Error for DbError
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 DbError
impl !UnwindSafe for DbError
impl Freeze for DbError
impl Send for DbError
impl Sync for DbError
impl Unpin for DbError
impl UnsafeUnpin for DbError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
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>
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