pub enum IsamError {
Io(Error),
Bincode(Box<ErrorKind>),
KeyNotFound,
DuplicateKey,
CorruptIndex(String),
LockPoisoned,
IndexNotFound(String),
SingleUserMode,
Timeout,
}Variants§
Io(Error)
Wraps any std::io::Error (e.g. file not found, permission denied).
The #[from] attribute lets the ? operator convert io::Error
automatically — no explicit .map_err(...) needed.
Bincode(Box<ErrorKind>)
Wraps bincode serialization/deserialization errors.
KeyNotFound
The requested key does not exist (used for update on missing key).
DuplicateKey
Attempted to insert a key that already exists in the index.
CorruptIndex(String)
The index file is corrupt or was created by an incompatible version.
LockPoisoned
A thread panicked while holding the database lock.
IndexNotFound(String)
No secondary index with the given name is registered on this database.
SingleUserMode
The database is in single-user mode and the calling thread is not the owner.
Timeout
Timed out waiting to acquire single-user mode (in-flight transaction did not finish in time).
Trait Implementations§
Source§impl Error for IsamError
impl Error for IsamError
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()
Auto Trait Implementations§
impl Freeze for IsamError
impl !RefUnwindSafe for IsamError
impl Send for IsamError
impl Sync for IsamError
impl Unpin for IsamError
impl UnsafeUnpin for IsamError
impl !UnwindSafe for IsamError
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