#[non_exhaustive]pub enum Error {
Index(IqdbError),
Persist(PersistError),
Config(&'static str),
}Expand description
An error from any iqdb operation.
The enum is #[non_exhaustive]: a match on it must include a wildcard
arm, and future releases may add variants without that being a breaking
change.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Index(IqdbError)
A failure from the index / vocabulary layer — a dimension mismatch,
an absent id, an invalid metric for the chosen index, and so on. See
iqdb_types::IqdbError for the full set of causes.
Persist(PersistError)
A failure from the durable-storage layer — snapshot or write-ahead-log
I/O, a corrupt or truncated on-disk file, a checksum mismatch, or an
unsupported compression feature. See iqdb_persist::PersistError.
Config(&'static str)
A handle-level configuration or consistency check failed. reason is
a short static description (for example, that a reopened database’s
dim or metric does not match the value passed to open).
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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
use the Display impl or to_string()
Source§impl From<PersistError> for Error
impl From<PersistError> for Error
Source§fn from(value: PersistError) -> Self
fn from(value: PersistError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin 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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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 more