#[non_exhaustive]pub enum DatabaseOpenError {
Io(Error),
UnexpectedEof,
VersionParse(DatabaseVersionParseError),
UnsupportedVersion,
Key(DatabaseKeyError),
Cryptography(CryptographyError),
Format(DatabaseFormatError),
}Expand description
Errors that can occur when 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.
Io(Error)
I/O errors that can occur while reading the database from the source
UnexpectedEof
An unexpected end of file was encountered while reading the database
VersionParse(DatabaseVersionParseError)
Errors related to parsing the database version from the file header
UnsupportedVersion
Attempted to open a database with an unsupported version
Key(DatabaseKeyError)
Errors related to the database key, such as incorrect keys
Cryptography(CryptographyError)
Errors related to decryption
Format(DatabaseFormatError)
Errors related to parsing the database format
Trait Implementations§
Source§impl Debug for DatabaseOpenError
impl Debug for DatabaseOpenError
Source§impl Display for DatabaseOpenError
impl Display for DatabaseOpenError
Source§impl Error for DatabaseOpenError
impl Error for DatabaseOpenError
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<CryptographyError> for DatabaseOpenError
impl From<CryptographyError> for DatabaseOpenError
Source§fn from(source: CryptographyError) -> Self
fn from(source: CryptographyError) -> Self
Converts to this type from the input type.
Source§impl From<DatabaseFormatError> for DatabaseOpenError
impl From<DatabaseFormatError> for DatabaseOpenError
Source§fn from(source: DatabaseFormatError) -> Self
fn from(source: DatabaseFormatError) -> Self
Converts to this type from the input type.
Source§impl From<DatabaseKeyError> for DatabaseOpenError
impl From<DatabaseKeyError> for DatabaseOpenError
Source§fn from(source: DatabaseKeyError) -> Self
fn from(source: DatabaseKeyError) -> Self
Converts to this type from the input type.
Source§impl From<DatabaseVersionParseError> for DatabaseOpenError
impl From<DatabaseVersionParseError> for DatabaseOpenError
Source§fn from(source: DatabaseVersionParseError) -> Self
fn from(source: DatabaseVersionParseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for DatabaseOpenError
impl !UnwindSafe for DatabaseOpenError
impl Freeze for DatabaseOpenError
impl Send for DatabaseOpenError
impl Sync for DatabaseOpenError
impl Unpin for DatabaseOpenError
impl UnsafeUnpin for DatabaseOpenError
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