#[non_exhaustive]pub enum DatabaseError {
DatabaseAlreadyOpen,
RepairAborted,
UpgradeRequired(u8),
Storage(StorageError),
}
Expand description
Errors related to opening a database
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.
DatabaseAlreadyOpen
The Database is already open. Cannot acquire lock.
RepairAborted
crate::RepairSession::abort was called.
UpgradeRequired(u8)
The database file is in an old file format and must be manually upgraded
Storage(StorageError)
Error from underlying storage
Trait Implementations§
Source§impl Debug for DatabaseError
impl Debug for DatabaseError
Source§impl Display for DatabaseError
impl Display for DatabaseError
Source§impl Error for DatabaseError
impl Error for DatabaseError
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<DatabaseError> for Error
impl From<DatabaseError> for Error
Source§fn from(err: DatabaseError) -> Error
fn from(err: DatabaseError) -> Error
Converts to this type from the input type.
Source§impl From<Error> for DatabaseError
impl From<Error> for DatabaseError
Source§fn from(err: Error) -> DatabaseError
fn from(err: Error) -> DatabaseError
Converts to this type from the input type.
Source§impl From<StorageError> for DatabaseError
impl From<StorageError> for DatabaseError
Source§fn from(err: StorageError) -> DatabaseError
fn from(err: StorageError) -> DatabaseError
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DatabaseError
impl !RefUnwindSafe for DatabaseError
impl Send for DatabaseError
impl Sync for DatabaseError
impl Unpin for DatabaseError
impl !UnwindSafe for DatabaseError
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
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 24 bytes
Size for each variant:
DatabaseAlreadyOpen
: 0 bytesRepairAborted
: 0 bytesUpgradeRequired
: 9 bytesStorage
: 24 bytes