#[non_exhaustive]pub enum EmbedError {
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),
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.
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()