pub enum Error {
Show 35 variants
KeyExist,
NotFound,
NoData,
PageNotFound,
Corrupted,
Panic,
VersionMismatch,
Invalid,
MapFull,
DbsFull,
ReadersFull,
TxnFull,
CursorFull,
PageFull,
UnableExtendMapSize,
Incompatible,
BadRslot,
BadTxn,
BadValSize,
BadDbi,
Problem,
Busy,
Multival,
BadSignature,
WannaRecovery,
KeyMismatch,
DecodeError,
Access,
TooLarge,
DecodeErrorLenDiff,
NestedTransactionsUnsupportedWithWriteMap,
WriteTransactionUnsupportedInReadOnlyMode,
ReadTransactionTimeout,
Permission,
Other(i32),
}
Expand description
An MDBX error kind.
Variants§
KeyExist
Key/data pair already exists.
NotFound
No matching key/data pair found.
NoData
The cursor is already at the end of data.
PageNotFound
Requested page not found.
Corrupted
Database is corrupted.
Panic
Fatal environment error.
VersionMismatch
DB version mismatch.
Invalid
File is not an MDBX file.
MapFull
Environment map size limit reached.
DbsFull
Too many DBI-handles (maxdbs reached).
ReadersFull
Too many readers (maxreaders reached).
TxnFull
Transaction has too many dirty pages (i.e., the transaction is too big).
CursorFull
Cursor stack limit reached.
PageFull
Page has no more space.
UnableExtendMapSize
The database engine was unable to extend mapping, e.g. the address space is unavailable or busy.
This can mean:
- The database size was extended by other processes beyond the environment map size, and the engine was unable to extend the mapping while starting a read transaction. The environment should be re-opened to continue.
- The engine was unable to extend the mapping during a write transaction or an explicit call to change the geometry of the environment.
Incompatible
Environment or database is not compatible with the requested operation or flags.
BadRslot
Invalid reuse of reader locktable slot.
BadTxn
Transaction is not valid for requested operation.
BadValSize
Invalid size or alignment of key or data for the target database.
BadDbi
The specified DBI-handle is invalid.
Problem
Unexpected internal error.
Busy
Another write transaction is running.
Multival
The specified key has more than one associated value.
BadSignature
Wrong signature of a runtime object(s).
WannaRecovery
Database should be recovered, but cannot be done automatically since it’s in read-only mode.
KeyMismatch
The given key value is mismatched to the current cursor position.
DecodeError
Decode error: An invalid parameter was specified.
Access
The environment opened in read-only.
TooLarge
Database is too large for the current system.
DecodeErrorLenDiff
Decode error length difference:
An invalid parameter was specified, or the environment has an active write transaction.
NestedTransactionsUnsupportedWithWriteMap
If the Environment was opened with
EnvironmentKind::WriteMap
flag, nested transactions
are not supported.
WriteTransactionUnsupportedInReadOnlyMode
If the Environment was opened with in read-only mode
Mode::ReadOnly
, write transactions can’t be opened.
ReadTransactionTimeout
Read transaction has been timed out.
Permission
Permission defined
Other(i32)
Unknown error code.
Implementations§
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
impl Copy for Error
impl Eq for Error
impl StructuralPartialEq for 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§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: 8 bytes
Size for each variant:
KeyExist
: 0 bytesNotFound
: 0 bytesNoData
: 0 bytesPageNotFound
: 0 bytesCorrupted
: 0 bytesPanic
: 0 bytesVersionMismatch
: 0 bytesInvalid
: 0 bytesMapFull
: 0 bytesDbsFull
: 0 bytesReadersFull
: 0 bytesTxnFull
: 0 bytesCursorFull
: 0 bytesPageFull
: 0 bytesUnableExtendMapSize
: 0 bytesIncompatible
: 0 bytesBadRslot
: 0 bytesBadTxn
: 0 bytesBadValSize
: 0 bytesBadDbi
: 0 bytesProblem
: 0 bytesBusy
: 0 bytesMultival
: 0 bytesBadSignature
: 0 bytesWannaRecovery
: 0 bytesKeyMismatch
: 0 bytesDecodeError
: 0 bytesAccess
: 0 bytesTooLarge
: 0 bytesDecodeErrorLenDiff
: 0 bytesNestedTransactionsUnsupportedWithWriteMap
: 0 bytesWriteTransactionUnsupportedInReadOnlyMode
: 0 bytesReadTransactionTimeout
: 0 bytesPermission
: 0 bytesOther
: 4 bytes