pub enum BackendError {
Show 16 variants
NotRunning,
ModelNotFound(String),
AlreadyLoaded(String),
InsufficientMemory,
NetworkError(String),
ProcessError(String),
BackendSpecific(String),
MissingApiKey(String),
ApiError {
status: u16,
message: String,
},
ParseError(String),
LoadError(String),
InferenceError(String),
InvalidConfig(String),
StorageError(String),
DownloadError(String),
ChecksumError {
expected: String,
actual: String,
},
}Expand description
Error types for backend operations.
Variants§
NotRunning
Backend server is not running.
ModelNotFound(String)
Model not found in registry or locally.
AlreadyLoaded(String)
Model is already loaded.
InsufficientMemory
Insufficient GPU/system memory.
NetworkError(String)
Network error during pull/API call.
ProcessError(String)
Process management error.
BackendSpecific(String)
Backend-specific error.
MissingApiKey(String)
Missing API key for cloud provider.
ApiError
API returned an error response.
ParseError(String)
Failed to parse API response.
LoadError(String)
Model loading failed.
InferenceError(String)
Inference failed.
InvalidConfig(String)
Invalid model configuration.
StorageError(String)
Storage/filesystem error.
DownloadError(String)
Download failed.
ChecksumError
Checksum verification failed.
Implementations§
Source§impl BackendError
impl BackendError
Sourcepub const fn is_retryable(&self) -> bool
pub const fn is_retryable(&self) -> bool
Returns true if this error is transient and the operation should be retried.
Retryable errors include network failures and temporary backend unavailability. Non-retryable errors include model not found, insufficient memory, etc.
Sourcepub fn is_auth_error(&self) -> bool
pub fn is_auth_error(&self) -> bool
Returns true if this is an authentication/authorization error.
Trait Implementations§
Source§impl Clone for BackendError
impl Clone for BackendError
Source§fn clone(&self) -> BackendError
fn clone(&self) -> BackendError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BackendError
impl Debug for BackendError
Source§impl Display for BackendError
impl Display for BackendError
Source§impl Error for BackendError
impl Error for BackendError
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()
Source§impl From<NativeError> for BackendError
impl From<NativeError> for BackendError
Source§fn from(err: NativeError) -> Self
fn from(err: NativeError) -> Self
Source§impl PartialEq for BackendError
impl PartialEq for BackendError
impl Eq for BackendError
impl StructuralPartialEq for BackendError
Auto Trait Implementations§
impl Freeze for BackendError
impl RefUnwindSafe for BackendError
impl Send for BackendError
impl Sync for BackendError
impl Unpin for BackendError
impl UnsafeUnpin for BackendError
impl UnwindSafe for BackendError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.