#[non_exhaustive]pub enum StorageError {
Corrupted(String),
ValueTooLarge(usize),
Io(Error),
PreviousIo,
LockPoisoned(&'static Location<'static>),
}
Expand description
General errors directly from the storage layer
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.
Corrupted(String)
The Database is corrupted
ValueTooLarge(usize)
The value being inserted exceeds the maximum of 3GiB
Io(Error)
PreviousIo
LockPoisoned(&'static Location<'static>)
Trait Implementations§
Source§impl Debug for StorageError
impl Debug for StorageError
Source§impl Display for StorageError
impl Display for StorageError
Source§impl Error for StorageError
impl Error for StorageError
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<Error> for StorageError
impl From<Error> for StorageError
Source§fn from(err: Error) -> StorageError
fn from(err: Error) -> StorageError
Converts to this type from the input type.
Source§impl<T> From<PoisonError<T>> for StorageError
impl<T> From<PoisonError<T>> for StorageError
Source§fn from(_: PoisonError<T>) -> StorageError
fn from(_: PoisonError<T>) -> StorageError
Converts to this type from the input type.
Source§impl From<StorageError> for CommitError
impl From<StorageError> for CommitError
Source§fn from(err: StorageError) -> CommitError
fn from(err: StorageError) -> CommitError
Converts to this type from the input type.
Source§impl From<StorageError> for CompactionError
impl From<StorageError> for CompactionError
Source§fn from(err: StorageError) -> CompactionError
fn from(err: StorageError) -> CompactionError
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.
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<StorageError> for SavepointError
impl From<StorageError> for SavepointError
Source§fn from(err: StorageError) -> SavepointError
fn from(err: StorageError) -> SavepointError
Converts to this type from the input type.
Source§impl From<StorageError> for TableError
impl From<StorageError> for TableError
Source§fn from(err: StorageError) -> TableError
fn from(err: StorageError) -> TableError
Converts to this type from the input type.
Source§impl From<StorageError> for TransactionError
impl From<StorageError> for TransactionError
Source§fn from(err: StorageError) -> TransactionError
fn from(err: StorageError) -> TransactionError
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for StorageError
impl !RefUnwindSafe for StorageError
impl Send for StorageError
impl Sync for StorageError
impl Unpin for StorageError
impl !UnwindSafe for StorageError
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:
Corrupted
: 24 bytesValueTooLarge
: 16 bytesIo
: 16 bytesPreviousIo
: 0 bytesLockPoisoned
: 16 bytes