#[non_exhaustive]pub enum Error {
Show 15 variants
DatabaseAlreadyOpen,
InvalidSavepoint,
PersistentSavepointExists,
EphemeralSavepointExists,
Corrupted(String),
UpgradeRequired(u8),
ValueTooLarge(usize),
TableTypeMismatch {
table: String,
key: TypeName,
value: TypeName,
},
TableIsMultimap(String),
TableIsNotMultimap(String),
TypeDefinitionChanged {
name: TypeName,
alignment: usize,
width: Option<usize>,
},
TableDoesNotExist(String),
TableAlreadyOpen(String, &'static Location<'static>),
Io(Error),
LockPoisoned(&'static Location<'static>),
}
Expand description
Superset of all other errors that can occur. Convenience enum so that users can convert all errors into a single type
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.
InvalidSavepoint
This savepoint is invalid or cannot be created.
Savepoints become invalid when an older savepoint is restored after it was created, and savepoints cannot be created if the transaction is “dirty” (any tables have been opened)
PersistentSavepointExists
A persistent savepoint exists
EphemeralSavepointExists
An Ephemeral savepoint exists
Corrupted(String)
The Database is corrupted
UpgradeRequired(u8)
The database file is in an old file format and must be manually upgraded
ValueTooLarge(usize)
The value being inserted exceeds the maximum of 3GiB
TableTypeMismatch
Table types didn’t match.
TableIsMultimap(String)
The table is a multimap table
TableIsNotMultimap(String)
The table is not a multimap table
TypeDefinitionChanged
TableDoesNotExist(String)
Table name does not match any table in database
TableAlreadyOpen(String, &'static Location<'static>)
Io(Error)
LockPoisoned(&'static Location<'static>)
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<CommitError> for Error
impl From<CommitError> for Error
source§fn from(err: CommitError) -> Error
fn from(err: CommitError) -> Error
Converts to this type from the input type.
source§impl From<CompactionError> for Error
impl From<CompactionError> for Error
source§fn from(err: CompactionError) -> Error
fn from(err: CompactionError) -> Error
Converts to this type from the input type.
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<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.
source§impl From<SavepointError> for Error
impl From<SavepointError> for Error
source§fn from(err: SavepointError) -> Error
fn from(err: SavepointError) -> Error
Converts to this type from the input type.
source§impl From<StorageError> for Error
impl From<StorageError> for Error
source§fn from(err: StorageError) -> Error
fn from(err: StorageError) -> Error
Converts to this type from the input type.
source§impl From<TableError> for Error
impl From<TableError> for Error
source§fn from(err: TableError) -> Error
fn from(err: TableError) -> Error
Converts to this type from the input type.
source§impl From<TransactionError> for Error
impl From<TransactionError> for Error
source§fn from(err: TransactionError) -> Error
fn from(err: TransactionError) -> 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