Enum DatabaseError
pub enum DatabaseError {
Show 13 variants
Open(DatabaseErrorInfo),
CreateTable(DatabaseErrorInfo),
Write(Box<DatabaseWriteError>),
Read(DatabaseErrorInfo),
Delete(DatabaseErrorInfo),
Commit(DatabaseErrorInfo),
InitTx(DatabaseErrorInfo),
InitCursor(DatabaseErrorInfo),
Decode,
Stats(DatabaseErrorInfo),
LogLevelUnavailable(LogLevel),
Other(String),
Custom(Arc<dyn Error + Sync + Send>),
}Expand description
Database error type.
Variants§
Open(DatabaseErrorInfo)
Failed to open the database.
CreateTable(DatabaseErrorInfo)
Failed to create a table in the database.
Write(Box<DatabaseWriteError>)
Failed to write a value into a table.
Read(DatabaseErrorInfo)
Failed to read a value from a table.
Delete(DatabaseErrorInfo)
Failed to delete a (key, value) pair from a table.
Commit(DatabaseErrorInfo)
Failed to commit transaction changes into the database.
InitTx(DatabaseErrorInfo)
Failed to initialize a transaction.
InitCursor(DatabaseErrorInfo)
Failed to initialize a cursor.
Decode
Failed to decode a key from a table.
Stats(DatabaseErrorInfo)
Failed to get database stats.
Failed to use the specified log level, as it’s not available.
Other(String)
Other unspecified error.
Custom(Arc<dyn Error + Sync + Send>)
Other unspecified error.
Trait Implementations§
§impl Clone for DatabaseError
impl Clone for DatabaseError
§fn clone(&self) -> DatabaseError
fn clone(&self) -> DatabaseError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for DatabaseError
impl Debug for DatabaseError
§impl Display for DatabaseError
impl Display for DatabaseError
§impl Error for DatabaseError
impl Error for DatabaseError
§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
use the Display impl or to_string()
§impl From<DatabaseError> for ProviderError
impl From<DatabaseError> for ProviderError
§fn from(source: DatabaseError) -> ProviderError
fn from(source: DatabaseError) -> ProviderError
Source§impl From<DatabaseError> for RethError
impl From<DatabaseError> for RethError
Source§fn from(source: DatabaseError) -> Self
fn from(source: DatabaseError) -> Self
§impl From<DatabaseWriteError> for DatabaseError
impl From<DatabaseWriteError> for DatabaseError
§fn from(error: DatabaseWriteError) -> DatabaseError
fn from(error: DatabaseWriteError) -> DatabaseError
§impl From<DecompressError> for DatabaseError
impl From<DecompressError> for DatabaseError
§fn from(_: DecompressError) -> DatabaseError
fn from(_: DecompressError) -> DatabaseError
§impl From<StorageRootError> for DatabaseError
impl From<StorageRootError> for DatabaseError
§fn from(err: StorageRootError) -> DatabaseError
fn from(err: StorageRootError) -> DatabaseError
Auto Trait Implementations§
impl !RefUnwindSafe for DatabaseError
impl !UnwindSafe for DatabaseError
impl Freeze for DatabaseError
impl Send for DatabaseError
impl Sync for DatabaseError
impl Unpin for DatabaseError
impl UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<T> MaybeDebug for Twhere
T: Debug,
§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
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: 32 bytes
Size for each variant:
Open: 31 bytesCreateTable: 31 bytesWrite: 15 bytesRead: 31 bytesDelete: 31 bytesCommit: 31 bytesInitTx: 31 bytesInitCursor: 31 bytesDecode: 0 bytesStats: 31 bytesLogLevelUnavailable: 1 byteOther: 31 bytesCustom: 23 bytes