pub enum ModelRuntimeError {
ModelNotFound(String),
ModelLoading,
SpawnFailed(String),
HealthCheckFailed(String),
ModelFileNotFound(String),
Internal(String),
}Expand description
Errors that can occur during model runtime operations.
Variants§
ModelNotFound(String)
The requested model was not found in the catalog.
ModelLoading
A model is currently loading; try again later. Callers should return 503 Service Unavailable.
SpawnFailed(String)
Failed to spawn the model server process.
HealthCheckFailed(String)
The model server failed its health check.
ModelFileNotFound(String)
The model file was not found on disk.
Internal(String)
Internal error during runtime operations.
Implementations§
Source§impl ModelRuntimeError
impl ModelRuntimeError
Sourcepub const fn is_retryable(&self) -> bool
pub const fn is_retryable(&self) -> bool
Returns true if this error indicates a temporary condition where retrying may succeed.
Sourcepub const fn suggested_status_code(&self) -> u16
pub const fn suggested_status_code(&self) -> u16
Returns a suggested HTTP status code for this error.
Trait Implementations§
Source§impl Debug for ModelRuntimeError
impl Debug for ModelRuntimeError
Source§impl Display for ModelRuntimeError
impl Display for ModelRuntimeError
Source§impl Error for ModelRuntimeError
impl Error for ModelRuntimeError
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()
Auto Trait Implementations§
impl Freeze for ModelRuntimeError
impl RefUnwindSafe for ModelRuntimeError
impl Send for ModelRuntimeError
impl Sync for ModelRuntimeError
impl Unpin for ModelRuntimeError
impl UnwindSafe for ModelRuntimeError
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