pub enum Error {
Heed(Error),
Io(Error),
InvalidVecDimension {
expected: usize,
received: usize,
},
DatabaseFull,
InvalidItemAppend,
UnmatchingDistance {
expected: String,
received: &'static str,
},
MissingMetadata(u16),
NeedBuild(u16),
MissingKey {
index: u16,
mode: &'static str,
item: ItemId,
},
}Expand description
The different set of errors that arroy can encounter.
Variants§
Heed(Error)
An internal error mostly related to LMDB or encoding/decoding.
Io(Error)
IO error
InvalidVecDimension
The user is trying to insert or search for a vector that is not of the right dimensions.
Fields
DatabaseFull
An internal error returned when arroy cannot generate internal IDs.
InvalidItemAppend
The user tried to append an item in the database but the last inserted item is highler or equal to this one.
UnmatchingDistance
The user is trying to query a database with a distance that is not of the right type.
Fields
MissingMetadata(u16)
Arroy is not able to find the metadata for a given index. It is probably because the user forget to build the database.
NeedBuild(u16)
The last time items in the database were updated, the [Writer::build] method wasn’t called.
MissingKey
Internal error
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)>
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 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
Mutably borrows from an owned value. Read more