pub enum FerrumError {
Show 22 variants
Config {
message: String,
},
Model {
message: String,
},
Tokenizer {
message: String,
},
Backend {
message: String,
},
Device {
message: String,
},
Scheduler {
message: String,
},
RequestValidation {
message: String,
},
ResourceExhausted {
message: String,
},
Timeout {
message: String,
},
Auth {
message: String,
},
RateLimit {
message: String,
},
IO {
message: String,
},
Serialization {
message: String,
},
Network {
message: String,
},
Internal {
message: String,
},
Cancelled {
message: String,
},
NotFound {
message: String,
},
AlreadyExists {
message: String,
},
PermissionDenied {
message: String,
},
Unsupported {
message: String,
},
InvalidFormat {
message: String,
},
InvalidParameter {
message: String,
},
}Expand description
Main error type for Ferrum operations
Variants§
Config
Configuration errors
Model
Model loading/initialization errors
Tokenizer
Tokenizer errors
Backend
Backend/runtime errors
Device
Device/memory errors
Scheduler
Scheduling/queue errors
RequestValidation
Request validation errors
ResourceExhausted
Resource exhaustion errors
Timeout
Timeout errors
Auth
Authentication/authorization errors
RateLimit
Rate limiting errors
IO
I/O errors
Serialization
Serialization/deserialization errors
Network
Network errors
Internal
Internal errors (should not happen in normal operation)
Cancelled
Request was cancelled
NotFound
Not found errors
AlreadyExists
Already exists errors
PermissionDenied
Permission denied errors
Unsupported
Unsupported operation errors
InvalidFormat
Invalid format errors (parsing, schema mismatches)
InvalidParameter
Invalid parameters or configuration values
Implementations§
Source§impl FerrumError
impl FerrumError
Sourcepub fn request_validation(message: impl Into<String>) -> Self
pub fn request_validation(message: impl Into<String>) -> Self
Create a request validation error
Sourcepub fn resource_exhausted(message: impl Into<String>) -> Self
pub fn resource_exhausted(message: impl Into<String>) -> Self
Create a resource exhausted error
Sourcepub fn rate_limit(message: impl Into<String>) -> Self
pub fn rate_limit(message: impl Into<String>) -> Self
Create a rate limit error
Sourcepub fn serialization(message: impl Into<String>) -> Self
pub fn serialization(message: impl Into<String>) -> Self
Create a serialization error
Sourcepub fn already_exists(message: impl Into<String>) -> Self
pub fn already_exists(message: impl Into<String>) -> Self
Create an already exists error
Sourcepub fn permission_denied(message: impl Into<String>) -> Self
pub fn permission_denied(message: impl Into<String>) -> Self
Create a permission denied error
Sourcepub fn unsupported(message: impl Into<String>) -> Self
pub fn unsupported(message: impl Into<String>) -> Self
Create an unsupported operation error
Sourcepub fn invalid_format(message: impl Into<String>) -> Self
pub fn invalid_format(message: impl Into<String>) -> Self
Create an invalid format error (parsing/schema mismatch)
Sourcepub fn invalid_parameter(message: impl Into<String>) -> Self
pub fn invalid_parameter(message: impl Into<String>) -> Self
Create an invalid parameter error
Sourcepub fn io_str(message: impl Into<String>) -> Self
pub fn io_str(message: impl Into<String>) -> Self
Alias for io() - Create an I/O error from string
Sourcepub fn configuration(message: impl Into<String>) -> Self
pub fn configuration(message: impl Into<String>) -> Self
Alias for config() - Create a configuration error
Sourcepub fn deserialization(message: impl Into<String>) -> Self
pub fn deserialization(message: impl Into<String>) -> Self
Alias for serialization() - Create a deserialization error
Sourcepub fn invalid_request(message: impl Into<String>) -> Self
pub fn invalid_request(message: impl Into<String>) -> Self
Alias for request_validation() - Create an invalid request error
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Check if this is a retryable error
Sourcepub fn is_client_error(&self) -> bool
pub fn is_client_error(&self) -> bool
Check if this is a client error (4xx equivalent)
Sourcepub fn is_server_error(&self) -> bool
pub fn is_server_error(&self) -> bool
Check if this is a server error (5xx equivalent)
Trait Implementations§
Source§impl Clone for FerrumError
impl Clone for FerrumError
Source§fn clone(&self) -> FerrumError
fn clone(&self) -> FerrumError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FerrumError
impl Debug for FerrumError
Source§impl<'de> Deserialize<'de> for FerrumError
impl<'de> Deserialize<'de> for FerrumError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for FerrumError
impl Display for FerrumError
Source§impl Error for FerrumError
impl Error for FerrumError
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<Error> for FerrumError
Conversion from std::io::Error
impl From<Error> for FerrumError
Conversion from std::io::Error
Source§impl From<Error> for FerrumError
Conversion from serde_json::Error
impl From<Error> for FerrumError
Conversion from serde_json::Error