#[non_exhaustive]pub enum EmbedError {
Show 14 variants
ModelNotLoaded(String),
WrongModelLoaded {
expected: String,
actual: String,
},
ModelInitialization(String),
InferenceFailed(String),
TaskFailed(String),
InvalidInput(String),
TextTooLong {
length: usize,
max: usize,
},
DimensionMismatch {
expected: usize,
actual: usize,
},
UnsupportedModel(String),
Unsupported(String),
AttestationReportSize {
length: usize,
min: usize,
max: usize,
},
ResourceBudgetOverflow {
retained_bytes: u64,
transient_work_bytes: u64,
},
Internal(String),
TierMismatch {
op: &'static str,
expected: QuantizationTier,
actual: QuantizationTier,
},
}Expand description
Stable: external consumers may depend on this; breaking changes require a SemVer bump.
Errors that can occur during embedding operations.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ModelNotLoaded(String)
Model not loaded (needs initialization).
WrongModelLoaded
Wrong model loaded (concurrent model switch in progress).
This can happen when multiple tasks request different models concurrently. The caller should retry with backoff.
ModelInitialization(String)
Model initialization failed.
InferenceFailed(String)
Embedding inference failed.
TaskFailed(String)
Blocking task failed (panic or cancellation).
The model cache may be lost; next call will reinitialize.
InvalidInput(String)
Invalid input provided.
TextTooLong
Input text exceeds maximum allowed length.
DimensionMismatch
Dimension mismatch between expected and actual.
UnsupportedModel(String)
Model not supported by this service.
Unsupported(String)
Operation not implemented by this service.
Returned by the default bodies of trait methods that an implementation has not overridden. The message names the service and the operation.
AttestationReportSize
An attestation report is outside the closed public byte bound.
Fields
ResourceBudgetOverflow
The independent retained and transient-work pools overflow aggregate accounting.
Fields
Internal(String)
Internal logic error (count mismatch, unexpected state).
TierMismatch
A prepared SIMD operation received data at a different quantization tier.
See docs/design.md for recovery and failure semantics.
Fields
expected: QuantizationTierTier the operation required.
actual: QuantizationTierTier actually supplied.
Trait Implementations§
Source§impl Debug for EmbedError
impl Debug for EmbedError
Source§impl Display for EmbedError
impl Display for EmbedError
Source§impl Error for EmbedError
impl Error for EmbedError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for EmbedError
impl RefUnwindSafe for EmbedError
impl Send for EmbedError
impl Sync for EmbedError
impl Unpin for EmbedError
impl UnsafeUnpin for EmbedError
impl UnwindSafe for EmbedError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
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> ⓘ
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