pub enum EmbedderError {
Provider(String),
DimMismatch {
expected: usize,
actual: usize,
},
Internal(String),
}Expand description
Errors produced by an Embedder.
Distinct from crate::MemoryError so the trait can be implemented in
backend crates without coupling to the full memory error surface. Callers
map these at the provider boundary via From<EmbedderError>.
Variants§
Provider(String)
The embedder’s upstream client failed (model load, rate limit, etc.).
DimMismatch
The embedder produced a vector with the wrong dimensionality.
Internal(String)
An unexpected internal error. Indicates a bug.
Trait Implementations§
Source§impl Debug for EmbedderError
impl Debug for EmbedderError
Source§impl Display for EmbedderError
impl Display for EmbedderError
Source§impl Error for EmbedderError
impl Error for EmbedderError
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<EmbedderError> for MemoryError
impl From<EmbedderError> for MemoryError
Source§fn from(e: EmbedderError) -> Self
fn from(e: EmbedderError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for EmbedderError
impl RefUnwindSafe for EmbedderError
impl Send for EmbedderError
impl Sync for EmbedderError
impl Unpin for EmbedderError
impl UnsafeUnpin for EmbedderError
impl UnwindSafe for EmbedderError
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