#[non_exhaustive]pub enum SemanticError {
Empty,
NotFinite,
ZeroVector,
DimensionMismatch {
expected: usize,
found: usize,
},
Snapshot(String),
}Expand description
Why a SemanticCache call was refused.
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.
Empty
The embedding has no dimensions.
NotFinite
The embedding holds a NaN or an infinity.
ZeroVector
The embedding is all zeros (or too small to normalize), so it has no direction.
DimensionMismatch
The embedding’s dimension isn’t the configured one or the scope’s.
Snapshot(String)
A snapshot couldn’t be written or read.
Trait Implementations§
Source§impl Clone for SemanticError
impl Clone for SemanticError
Source§impl Debug for SemanticError
impl Debug for SemanticError
Source§impl Display for SemanticError
impl Display for SemanticError
impl Eq for SemanticError
Source§impl Error for SemanticError
impl Error for SemanticError
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 PartialEq for SemanticError
impl PartialEq for SemanticError
impl StructuralPartialEq for SemanticError
Auto Trait Implementations§
impl Forget for SemanticError
impl Freeze for SemanticError
impl Move for SemanticError
impl RefUnwindSafe for SemanticError
impl Send for SemanticError
impl Sync for SemanticError
impl Unpin for SemanticError
impl UnsafeUnpin for SemanticError
impl UnwindSafe for SemanticError
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