pub enum ColbertError {
Candle(Error),
Tokenizer(String),
Json(Error),
Operation(String),
Hub(ApiError),
Io(Error),
}
Expand description
Custom error enum for all possible errors in the ColBERT library.
This enum consolidates errors from various dependencies like candle_core
,
tokenizers
, and serde_json
, as well as custom operational errors.
Variants§
Candle(Error)
Error originating from the candle_core
library.
Tokenizer(String)
Error originating from the tokenizers
library.
Json(Error)
Error related to JSON serialization or deserialization.
Operation(String)
Custom operational errors, e.g., missing configuration values.
Hub(ApiError)
Error originating from the hf-hub
library for Hugging Face Hub interactions.
Io(Error)
I/O errors, typically from reading model files.
Trait Implementations§
Source§impl Debug for ColbertError
impl Debug for ColbertError
Source§impl Display for ColbertError
impl Display for ColbertError
Source§impl Error for ColbertError
impl Error for ColbertError
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<ApiError> for ColbertError
impl From<ApiError> for ColbertError
Source§impl From<Error> for ColbertError
impl From<Error> for ColbertError
Source§impl From<Error> for ColbertError
impl From<Error> for ColbertError
Auto Trait Implementations§
impl Freeze for ColbertError
impl !RefUnwindSafe for ColbertError
impl Send for ColbertError
impl Sync for ColbertError
impl Unpin for ColbertError
impl !UnwindSafe for ColbertError
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string()
Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString
. Read more