pub enum Error {
BucketExists,
BucketMissing,
KeyValueMissing,
IncompatibleValue,
ReadOnlyTx,
Io(Error),
Sync(&'static str),
InvalidDB(String),
Alloc(LayoutError),
}
Expand description
Possible database errors
Variants§
BucketExists
Tried to create a bucket that already exists
BucketMissing
Tried to get a bucket that does not exist
KeyValueMissing
Tried to delete a key / value pair that does not exist
IncompatibleValue
Tried to get a bucket but found a key / value pair instead, or tried to put a key / value pair but found an existing bucket
ReadOnlyTx
Tried to write to a read only transaction
Io(Error)
Wrapper around a std::io::Error
that occurred while opening the file or writing to it
Sync(&'static str)
Wrapper around a PoisonError
InvalidDB(String)
Error returned when the DB is found to be in an invalid state
Alloc(LayoutError)
Errors that can occur during allocation
Trait Implementations§
source§impl Error for Error
impl Error for Error
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<LayoutError> for Error
impl From<LayoutError> for Error
source§fn from(err: LayoutError) -> Error
fn from(err: LayoutError) -> Error
Converts to this type from the input type.
source§impl<T> From<PoisonError<T>> for Error
impl<T> From<PoisonError<T>> for Error
source§fn from(_: PoisonError<T>) -> Error
fn from(_: PoisonError<T>) -> Error
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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