pub enum StoreError {
KeyNotFound(DbKey),
KeyAlreadyExists(String),
HashAlreadyExists(Hash),
DataInconsistency(String),
DbError(Error),
DeserializationError(Box<ErrorKind>),
}Variants§
KeyNotFound(DbKey)
KeyAlreadyExists(String)
HashAlreadyExists(Hash)
Specialization of key already exists for the common Hash case.
Added for avoiding the String allocation
DataInconsistency(String)
DbError(Error)
DeserializationError(Box<ErrorKind>)
Trait Implementations§
Source§impl Debug for StoreError
impl Debug for StoreError
Source§impl Display for StoreError
impl Display for StoreError
Source§impl Error for StoreError
impl Error for StoreError
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 StoreError
impl From<Error> for StoreError
Source§impl StoreErrorPredicates for StoreError
impl StoreErrorPredicates for StoreError
Source§fn is_key_not_found(&self) -> bool
fn is_key_not_found(&self) -> bool
Returns
true if this error represents a missing entry (e.g. key not found).Source§fn is_already_exists(&self) -> bool
fn is_already_exists(&self) -> bool
Returns
true if this error represents a duplicate write (e.g. key/hash already exists).Auto Trait Implementations§
impl !RefUnwindSafe for StoreError
impl !UnwindSafe for StoreError
impl Freeze for StoreError
impl Send for StoreError
impl Sync for StoreError
impl Unpin for StoreError
impl UnsafeUnpin for StoreError
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
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> ⓘ
Converts
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> ⓘ
Converts
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 more