#[non_exhaustive]pub enum IndexError {
InvalidMagic {
found: [u8; 6],
},
UnsupportedVersion {
found: u32,
supported: u32,
},
Truncated {
section: &'static str,
},
Corrupt {
reason: &'static str,
},
Fst(Error),
VectorsUnsupported,
VectorDim {
expected: u32,
found: u32,
},
}Expand description
Everything that can go wrong building or reading an index.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
InvalidMagic
The blob does not start with the format magic.
UnsupportedVersion
The format version is newer than this crate understands.
Fields
Truncated
The blob ends before a section the header promises.
Corrupt
A section’s internal structure is inconsistent (bad offset, bad postings, overflowing count, non-finite vector metadata).
Fst(Error)
The FST dictionary itself failed to load.
VectorsUnsupported
The index carries a quantized-vector section, but this build was
compiled without the vectors feature. Rebuild with the feature,
or use an index built without vectors.
VectorDim
A vector was set with a dimension different from the one already established for this index.
Trait Implementations§
Source§impl Debug for IndexError
impl Debug for IndexError
Source§impl Display for IndexError
impl Display for IndexError
Source§impl Error for IndexError
impl Error for IndexError
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 !RefUnwindSafe for IndexError
impl !UnwindSafe for IndexError
impl Forget for IndexError
impl Freeze for IndexError
impl Move for IndexError
impl Send for IndexError
impl Sync for IndexError
impl Unpin for IndexError
impl UnsafeUnpin for IndexError
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