pub enum RuntimeError {
KeyExists,
KeyNotFound,
ResizeNeeded,
TableNotFound,
Io(Error),
}
Expand description
Errors that occur after successful Env::open
.
There are no errors for:
- Missing tables
- (De)serialization
as cuprate_database
upholds the invariant that:
- All tables exist
- (De)serialization never fails
Variants§
KeyExists
The given key already existed in the database.
KeyNotFound
The given key did not exist in the database.
ResizeNeeded
The database memory map is full and needs a resize.
§Invariant
This error can only occur if Env::MANUAL_RESIZE
is true
.
TableNotFound
The given table did not exist in the database.
Io(Error)
Trait Implementations§
Source§impl Debug for RuntimeError
impl Debug for RuntimeError
Source§impl Display for RuntimeError
impl Display for RuntimeError
Source§impl Error for RuntimeError
impl Error for RuntimeError
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 RuntimeError
impl From<Error> for RuntimeError
Auto Trait Implementations§
impl Freeze for RuntimeError
impl !RefUnwindSafe for RuntimeError
impl Send for RuntimeError
impl Sync for RuntimeError
impl Unpin for RuntimeError
impl !UnwindSafe for RuntimeError
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: 16 bytes
Size for each variant:
KeyExists
: 0 bytesKeyNotFound
: 0 bytesResizeNeeded
: 0 bytesTableNotFound
: 0 bytesIo
: 8 bytes