pub enum QuantError {
EmptyVector,
DimensionTooLarge {
actual: usize,
maximum: usize,
},
NonFinite {
index: usize,
},
NonUnitNorm {
squared_norm_bits: u64,
tolerance_bits: u64,
},
OutputLength {
expected: usize,
actual: usize,
},
CodeLength {
expected: usize,
actual: usize,
},
NonZeroPadding {
byte: u8,
mask: u8,
},
}Expand description
Typed failure from a training-free quantizer or estimator.
Variants§
EmptyVector
The input dimension is zero, for which a code direction is undefined.
DimensionTooLarge
The vector exceeds the dimension supported by the reused i8 kernel.
NonFinite
A coordinate was NaN or infinite.
NonUnitNorm
A caller-declared L2-normalized vector was outside the unit-norm band.
Fields
OutputLength
A caller-owned output buffer had the wrong byte length.
CodeLength
A packed row had the wrong byte length for the query dimension.
NonZeroPadding
Unused low-order fields in a final partial byte were not zero.
Trait Implementations§
Source§impl Clone for QuantError
impl Clone for QuantError
Source§fn clone(&self) -> QuantError
fn clone(&self) -> QuantError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for QuantError
impl Debug for QuantError
Source§impl Display for QuantError
impl Display for QuantError
impl Eq for QuantError
Source§impl Error for QuantError
impl Error for QuantError
1.30.0 · 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<QuantError> for GraphBuildError
impl From<QuantError> for GraphBuildError
Source§fn from(error: QuantError) -> Self
fn from(error: QuantError) -> Self
Converts to this type from the input type.
Source§impl From<QuantError> for GraphSearchError
impl From<QuantError> for GraphSearchError
Source§fn from(error: QuantError) -> Self
fn from(error: QuantError) -> Self
Converts to this type from the input type.
Source§impl From<QuantError> for ScanError
impl From<QuantError> for ScanError
Source§fn from(error: QuantError) -> Self
fn from(error: QuantError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for QuantError
impl PartialEq for QuantError
impl StructuralPartialEq for QuantError
Auto Trait Implementations§
impl Freeze for QuantError
impl RefUnwindSafe for QuantError
impl Send for QuantError
impl Sync for QuantError
impl Unpin for QuantError
impl UnsafeUnpin for QuantError
impl UnwindSafe for QuantError
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