pub enum VectorError {
Show 26 variants
IndexNotFound(String),
IndexAlreadyExists(String),
InvalidIndexConfig(String),
VectorNotFound(String),
DimensionMismatch {
expected: usize,
actual: usize,
},
InvalidVector(String),
EmbeddingError(String),
InvalidQuery(String),
QueryTimeout {
seconds: u64,
},
InvalidFilter(String),
StorageBackend(String),
ConnectionFailed(String),
AuthenticationFailed(String),
PermissionDenied(String),
Serialization(String),
Deserialization(String),
InvalidConfig(String),
MissingConfig(String),
ResourceLimitExceeded(String),
InsufficientStorage,
OutOfMemory,
NotSupported(String),
OperationFailed(String),
ConcurrentModification,
Internal(String),
Unexpected(String),
}
Expand description
Comprehensive error type for vector storage operations
Variants§
IndexNotFound(String)
Index-related errors
IndexAlreadyExists(String)
InvalidIndexConfig(String)
VectorNotFound(String)
Vector-related errors
DimensionMismatch
InvalidVector(String)
EmbeddingError(String)
InvalidQuery(String)
Query-related errors
QueryTimeout
InvalidFilter(String)
StorageBackend(String)
Storage backend errors
ConnectionFailed(String)
AuthenticationFailed(String)
PermissionDenied(String)
Serialization(String)
Serialization errors
Deserialization(String)
InvalidConfig(String)
Configuration errors
MissingConfig(String)
ResourceLimitExceeded(String)
Resource errors
InsufficientStorage
OutOfMemory
NotSupported(String)
Operation errors
OperationFailed(String)
ConcurrentModification
Internal(String)
Internal errors
Unexpected(String)
Implementations§
Source§impl VectorError
impl VectorError
Sourcepub fn index_not_found(name: impl Into<String>) -> VectorError
pub fn index_not_found(name: impl Into<String>) -> VectorError
Create an index not found error
Sourcepub fn index_already_exists(name: impl Into<String>) -> VectorError
pub fn index_already_exists(name: impl Into<String>) -> VectorError
Create an index already exists error
Sourcepub fn dimension_mismatch(expected: usize, actual: usize) -> VectorError
pub fn dimension_mismatch(expected: usize, actual: usize) -> VectorError
Create a dimension mismatch error
Sourcepub fn vector_not_found(id: impl Into<String>) -> VectorError
pub fn vector_not_found(id: impl Into<String>) -> VectorError
Create a vector not found error
Sourcepub fn storage_backend(msg: impl Into<String>) -> VectorError
pub fn storage_backend(msg: impl Into<String>) -> VectorError
Create a storage backend error
Sourcepub fn connection_failed(msg: impl Into<String>) -> VectorError
pub fn connection_failed(msg: impl Into<String>) -> VectorError
Create a connection failed error
Sourcepub fn invalid_config(msg: impl Into<String>) -> VectorError
pub fn invalid_config(msg: impl Into<String>) -> VectorError
Create an invalid configuration error
Sourcepub fn serialization(msg: impl Into<String>) -> VectorError
pub fn serialization(msg: impl Into<String>) -> VectorError
Create a serialization error
Sourcepub fn internal(msg: impl Into<String>) -> VectorError
pub fn internal(msg: impl Into<String>) -> VectorError
Create an internal error
Sourcepub fn embedding_error(msg: impl Into<String>) -> VectorError
pub fn embedding_error(msg: impl Into<String>) -> VectorError
Create an embedding error
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Check if this error is retryable
Sourcepub fn is_client_error(&self) -> bool
pub fn is_client_error(&self) -> bool
Check if this error is a client error (4xx equivalent)
Sourcepub fn is_server_error(&self) -> bool
pub fn is_server_error(&self) -> bool
Check if this error is a server error (5xx equivalent)
Trait Implementations§
Source§impl Clone for VectorError
impl Clone for VectorError
Source§fn clone(&self) -> VectorError
fn clone(&self) -> VectorError
Returns a duplicate of the value. Read more
1.0.0 · 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 VectorError
impl Debug for VectorError
Source§impl Display for VectorError
impl Display for VectorError
Source§impl Error for VectorError
impl Error for VectorError
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<Error> for VectorError
Convert from standard I/O errors
impl From<Error> for VectorError
Convert from standard I/O errors
Source§fn from(err: Error) -> VectorError
fn from(err: Error) -> VectorError
Converts to this type from the input type.
Source§impl From<Error> for VectorError
Convert from serde JSON errors
impl From<Error> for VectorError
Convert from serde JSON errors
Source§fn from(err: Error) -> VectorError
fn from(err: Error) -> VectorError
Converts to this type from the input type.
Source§impl From<PostgresError> for VectorError
impl From<PostgresError> for VectorError
Source§fn from(err: PostgresError) -> Self
fn from(err: PostgresError) -> 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more