pub enum StorageError {
Show 15 variants
Connection {
message: String,
source: Option<Box<dyn Error + Send + Sync>>,
},
Serialization {
message: String,
source: Option<Box<dyn Error + Send + Sync>>,
},
JobNotFound {
job_id: String,
},
Timeout {
timeout_ms: u64,
},
Unavailable {
reason: String,
},
Configuration {
message: String,
},
OperationFailed {
operation: String,
message: String,
source: Option<Box<dyn Error + Send + Sync>>,
},
CapacityExceeded {
message: String,
},
ConcurrentModification {
job_id: String,
},
MigrationError {
message: String,
},
InvalidJobData {
message: String,
},
ConnectionError {
message: String,
},
SerializationError {
message: String,
},
DeserializationError {
message: String,
},
OperationError {
message: String,
},
}
Expand description
Storage-specific errors that can occur during job persistence operations
Variants§
Connection
Connection-related errors (network, authentication, etc.)
Serialization
Serialization/deserialization errors when converting jobs to/from storage format
JobNotFound
Job not found in storage
Timeout
Storage operation timed out
Storage is unavailable or down
Configuration
Configuration errors
OperationFailed
General storage operation errors
CapacityExceeded
Storage capacity exceeded
ConcurrentModification
Concurrent modification detected
MigrationError
Database migration errors
InvalidJobData
Invalid job data format
ConnectionError
Connection-specific error (shorthand)
SerializationError
Serialization-specific error (shorthand)
DeserializationError
Deserialization-specific error (shorthand)
OperationError
Operation-specific error (shorthand)
Implementations§
Source§impl StorageError
impl StorageError
Sourcepub fn connection<S: Into<String>>(message: S) -> Self
pub fn connection<S: Into<String>>(message: S) -> Self
Create a connection error with a message
Sourcepub fn connection_with_source<S: Into<String>>(
message: S,
source: Box<dyn Error + Send + Sync>,
) -> Self
pub fn connection_with_source<S: Into<String>>( message: S, source: Box<dyn Error + Send + Sync>, ) -> Self
Create a connection error with a message and source error
Sourcepub fn serialization<S: Into<String>>(message: S) -> Self
pub fn serialization<S: Into<String>>(message: S) -> Self
Create a serialization error with a message
Sourcepub fn serialization_with_source<S: Into<String>>(
message: S,
source: Box<dyn Error + Send + Sync>,
) -> Self
pub fn serialization_with_source<S: Into<String>>( message: S, source: Box<dyn Error + Send + Sync>, ) -> Self
Create a serialization error with a message and source error
Sourcepub fn job_not_found<S: Into<String>>(job_id: S) -> Self
pub fn job_not_found<S: Into<String>>(job_id: S) -> Self
Create a job not found error
Create an unavailable error
Sourcepub fn configuration<S: Into<String>>(message: S) -> Self
pub fn configuration<S: Into<String>>(message: S) -> Self
Create a configuration error
Sourcepub fn operation_failed<S: Into<String>, T: Into<String>>(
operation: S,
message: T,
) -> Self
pub fn operation_failed<S: Into<String>, T: Into<String>>( operation: S, message: T, ) -> Self
Create an operation failed error
Sourcepub fn operation_failed_with_source<S: Into<String>, T: Into<String>>(
operation: S,
message: T,
source: Box<dyn Error + Send + Sync>,
) -> Self
pub fn operation_failed_with_source<S: Into<String>, T: Into<String>>( operation: S, message: T, source: Box<dyn Error + Send + Sync>, ) -> Self
Create an operation failed error with source
Sourcepub fn capacity_exceeded<S: Into<String>>(message: S) -> Self
pub fn capacity_exceeded<S: Into<String>>(message: S) -> Self
Create a capacity exceeded error
Sourcepub fn concurrent_modification<S: Into<String>>(job_id: S) -> Self
pub fn concurrent_modification<S: Into<String>>(job_id: S) -> Self
Create a concurrent modification error