pub enum FastEmbedError {
ModelInitialization(String),
ModelNotInitialized(String),
EmbeddingGeneration(String),
TextTooLong {
length: usize,
max_length: usize,
},
InvalidConfiguration(String),
Io(Error),
Serialization(Error),
ModelDownload(String),
CacheDirectory(String),
UnsupportedOperation(String),
Generic(String),
}Expand description
Errors that can occur when using FastEmbed
Variants§
ModelInitialization(String)
Model initialization failed
ModelNotInitialized(String)
Model not initialized
EmbeddingGeneration(String)
Embedding generation failed
TextTooLong
Text is too long for the model
InvalidConfiguration(String)
Invalid model configuration
Io(Error)
IO error (file operations, cache, etc.)
Serialization(Error)
Serialization/deserialization error
ModelDownload(String)
Model download failed
CacheDirectory(String)
Cache directory error
UnsupportedOperation(String)
Unsupported operation
Generic(String)
Generic error
Implementations§
Source§impl FastEmbedError
impl FastEmbedError
Sourcepub fn model_init<S: Into<String>>(msg: S) -> Self
pub fn model_init<S: Into<String>>(msg: S) -> Self
Create a new model initialization error
Sourcepub fn is_recoverable(&self) -> bool
pub fn is_recoverable(&self) -> bool
Check if this is a recoverable error
Trait Implementations§
Source§impl Debug for FastEmbedError
impl Debug for FastEmbedError
Source§impl Display for FastEmbedError
impl Display for FastEmbedError
Source§impl Error for FastEmbedError
impl Error for FastEmbedError
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 FastEmbedError
impl From<Error> for FastEmbedError
Source§impl From<Error> for FastEmbedError
impl From<Error> for FastEmbedError
Source§impl From<FastEmbedError> for VectorError
impl From<FastEmbedError> for VectorError
Source§fn from(err: FastEmbedError) -> Self
fn from(err: FastEmbedError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for FastEmbedError
impl !RefUnwindSafe for FastEmbedError
impl Send for FastEmbedError
impl Sync for FastEmbedError
impl Unpin for FastEmbedError
impl !UnwindSafe for FastEmbedError
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> 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