pub enum HnswError {
Config(HnswConfigError),
Index(HnswIndexError),
Storage(HnswStorageError),
MultiLayer(HnswMultiLayerError),
}Expand description
Combined HNSW error type
This type encompasses all possible HNSW-related errors for convenience when handling errors from HNSW operations.
§Examples
use sqlitegraph::hnsw::errors::HnswError;
fn handle_hnsw_result(result: Result<(), HnswError>) {
match result {
Ok(()) => println!("Operation successful"),
Err(e) => println!("HNSW error: {}", e),
}
}Variants§
Config(HnswConfigError)
Configuration-related errors
Index(HnswIndexError)
Index operation errors
Storage(HnswStorageError)
Storage operation errors
MultiLayer(HnswMultiLayerError)
Multi-layer operation errors
Trait Implementations§
Source§impl Error for HnswError
impl Error for HnswError
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<HnswConfigError> for HnswError
impl From<HnswConfigError> for HnswError
Source§fn from(err: HnswConfigError) -> Self
fn from(err: HnswConfigError) -> Self
Converts to this type from the input type.
Source§impl From<HnswIndexError> for HnswError
impl From<HnswIndexError> for HnswError
Source§fn from(err: HnswIndexError) -> Self
fn from(err: HnswIndexError) -> Self
Converts to this type from the input type.
Source§impl From<HnswMultiLayerError> for HnswError
impl From<HnswMultiLayerError> for HnswError
Source§fn from(err: HnswMultiLayerError) -> Self
fn from(err: HnswMultiLayerError) -> Self
Converts to this type from the input type.
Source§impl From<HnswStorageError> for HnswError
impl From<HnswStorageError> for HnswError
Source§fn from(err: HnswStorageError) -> Self
fn from(err: HnswStorageError) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for HnswError
Auto Trait Implementations§
impl Freeze for HnswError
impl RefUnwindSafe for HnswError
impl Send for HnswError
impl Sync for HnswError
impl Unpin for HnswError
impl UnwindSafe for HnswError
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> 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