#[non_exhaustive]pub enum Error {
Show 19 variants
DatabaseAlreadyOpen,
InvalidSavepoint,
RepairAborted,
PersistentSavepointExists,
EphemeralSavepointExists,
TransactionInProgress,
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),
PreviousIo,
LockPoisoned(&'static Location<'static>),
ReadTransactionStillInUse(ReadTransaction),
}
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
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)
RepairAborted
crate::RepairSession::abort was called.
PersistentSavepointExists
A persistent savepoint exists
EphemeralSavepointExists
An Ephemeral savepoint exists
TransactionInProgress
A transaction is still in-progress
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)
PreviousIo
A previous IO error occurred. The database must be closed and re-opened
LockPoisoned(&'static Location<'static>)
ReadTransactionStillInUse(ReadTransaction)
The transaction is still referenced by a table or other object
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<CommitError> for Error
impl From<CommitError> for Error
Source§fn from(err: CommitError) -> Error
fn from(err: CommitError) -> Error
Source§impl From<CompactionError> for Error
impl From<CompactionError> for Error
Source§fn from(err: CompactionError) -> Error
fn from(err: CompactionError) -> Error
Source§impl From<DatabaseError> for Error
impl From<DatabaseError> for Error
Source§fn from(err: DatabaseError) -> Error
fn from(err: DatabaseError) -> Error
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
Source§impl From<SavepointError> for Error
impl From<SavepointError> for Error
Source§fn from(err: SavepointError) -> Error
fn from(err: SavepointError) -> Error
Source§impl From<StorageError> for Error
impl From<StorageError> for Error
Source§fn from(err: StorageError) -> Error
fn from(err: StorageError) -> Error
Source§impl From<TableError> for Error
impl From<TableError> for Error
Source§fn from(err: TableError) -> Error
fn from(err: TableError) -> Error
Source§impl From<TransactionError> for Error
impl From<TransactionError> for Error
Source§fn from(err: TransactionError) -> Error
fn from(err: TransactionError) -> Error
Auto Trait Implementations§
impl Freeze for Error
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
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: 144 bytes
Size for each variant:
DatabaseAlreadyOpen
: 0 bytesInvalidSavepoint
: 0 bytesRepairAborted
: 0 bytesPersistentSavepointExists
: 0 bytesEphemeralSavepointExists
: 0 bytesTransactionInProgress
: 0 bytesCorrupted
: 40 bytesUpgradeRequired
: 17 bytesValueTooLarge
: 24 bytesTableTypeMismatch
: 104 bytesTableIsMultimap
: 40 bytesTableIsNotMultimap
: 40 bytesTypeDefinitionChanged
: 72 bytesTableDoesNotExist
: 40 bytesTableAlreadyOpen
: 48 bytesIo
: 24 bytesPreviousIo
: 0 bytesLockPoisoned
: 24 bytesReadTransactionStillInUse
: 144 bytes