pub enum VectorError {
DimensionMismatch {
expected: usize,
actual: usize,
},
InvalidDimension {
expected: usize,
actual: usize,
},
IndexOutOfBounds {
index: usize,
max: usize,
},
InvalidValue {
index: usize,
value: f32,
reason: &'static str,
},
InvalidName(String),
SpaceNotFound(String),
EmbeddingNotFound {
entity_id: u64,
space: String,
},
Encoding(String),
Storage(StorageError),
LockPoisoned,
NodeNotFound(EntityId),
InvalidGraphState(&'static str),
}Expand description
Errors that can occur in vector operations.
Variants§
DimensionMismatch
Dimension mismatch between vectors or embedding spaces.
InvalidDimension
Invalid dimension (e.g., zero).
IndexOutOfBounds
Index out of bounds.
Fields
InvalidValue
Invalid value in a vector (NaN, Infinity).
Fields
InvalidName(String)
Invalid embedding name.
SpaceNotFound(String)
Embedding space not found.
EmbeddingNotFound
Embedding not found for entity.
Encoding(String)
Encoding/decoding error.
Storage(StorageError)
Storage backend error.
LockPoisoned
Lock poisoned - indicates concurrent panic corrupted the data structure.
This error is unrecoverable - the index must be dropped and recreated.
NodeNotFound(EntityId)
Node not found in the graph.
This typically indicates an internal inconsistency in the index structure.
InvalidGraphState(&'static str)
Invalid graph state - internal invariant violation.
This typically indicates an internal bug where expected graph state is missing.
Trait Implementations§
Source§impl Debug for VectorError
impl Debug for VectorError
Source§impl Display for VectorError
impl Display for VectorError
Source§impl Error for VectorError
impl Error for VectorError
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<StorageError> for VectorError
impl From<StorageError> for VectorError
Source§fn from(source: StorageError) -> Self
fn from(source: StorageError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for VectorError
impl !RefUnwindSafe for VectorError
impl Send for VectorError
impl Sync for VectorError
impl Unpin for VectorError
impl !UnwindSafe for VectorError
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