pub enum RuntimeError {
Show 22 variants
Config(String),
AliasNotFound {
alias: String,
},
ProviderNotFound(String),
CapabilityMismatch(String),
ProviderCapabilityMissing {
alias: String,
provider_id: String,
capability: String,
},
Load(String),
ApiError(String),
InferenceError(String),
OnnxModelNotFound {
alias: String,
path: PathBuf,
},
OnnxArtifactSelectionFailure {
alias: String,
cause: String,
},
OnnxDownloadFailure {
alias: String,
cause: String,
},
OnnxLoadFailure {
alias: String,
path: PathBuf,
cause: String,
},
OnnxSignatureIntrospectionFailure {
alias: String,
cause: String,
},
OnnxInputMissing {
alias: String,
required_input: String,
},
OnnxInputTypeMismatch {
alias: String,
input_name: String,
expected: TensorDtype,
got: TensorDtype,
},
OnnxInputShapeMismatch {
alias: String,
input_name: String,
expected: Vec<DimSize>,
got: Vec<usize>,
},
OnnxInvocationFailure {
alias: String,
cause: String,
},
OnnxBatchStackingFailure {
alias: String,
cause: String,
},
RateLimited,
Unauthorized,
Timeout,
Unavailable,
}Expand description
Unified error type covering configuration, loading, inference, and transport failures.
Variants are intentionally coarse-grained so that callers can match on error category (e.g. retryable vs permanent) rather than on provider-specific details.
Variants§
Config(String)
Invalid or missing configuration (bad alias format, unknown option, etc.).
AliasNotFound
The requested alias does not exist in the runtime catalog.
ProviderNotFound(String)
The requested provider ID is not registered with the runtime.
CapabilityMismatch(String)
A model was requested for a task the provider does not support.
ProviderCapabilityMissing
The resolved provider does not expose the requested runtime capability.
Load(String)
Model loading or initialization failed (download, weight parsing, etc.).
ApiError(String)
An HTTP or transport-level error from a remote provider.
InferenceError(String)
An error during model inference (tokenization, forward pass, etc.).
OnnxModelNotFound
OnnxArtifactSelectionFailure
OnnxDownloadFailure
OnnxLoadFailure
OnnxSignatureIntrospectionFailure
OnnxInputMissing
OnnxInputTypeMismatch
OnnxInputShapeMismatch
OnnxInvocationFailure
OnnxBatchStackingFailure
RateLimited
The remote API returned HTTP 429 (too many requests).
The remote API returned HTTP 401/403 (bad or missing credentials).
Timeout
The operation exceeded its configured timeout.
The service is currently unavailable (HTTP 5xx, circuit breaker open, etc.).
Implementations§
Source§impl RuntimeError
impl RuntimeError
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Returns true for transient errors that may succeed on retry:
RateLimited, Timeout, and
Unavailable.
Trait Implementations§
Source§impl Debug for RuntimeError
impl Debug for RuntimeError
Source§impl Display for RuntimeError
impl Display for RuntimeError
Source§impl Error for RuntimeError
impl Error for RuntimeError
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 RuntimeError
impl RefUnwindSafe for RuntimeError
impl Send for RuntimeError
impl Sync for RuntimeError
impl Unpin for RuntimeError
impl UnsafeUnpin for RuntimeError
impl UnwindSafe for RuntimeError
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<T> Downcast for Twhere
T: AsAny + ?Sized,
impl<T> Downcast for Twhere
T: AsAny + ?Sized,
§fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
Any.§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
Any.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string()] Read more§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString]. Read more