Enum apalis_core::error::JobError
source · #[non_exhaustive]
pub enum JobError {
WorkerCrashed,
Failed(Box<dyn StdError + Send + Sync + 'static>),
Storage(StorageError),
Io(Error),
Unknown,
}Expand description
Represents an error that is returned from an job.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
WorkerCrashed
A background worker has crashed.
Failed(Box<dyn StdError + Send + Sync + 'static>)
An error occured during execution.
Storage(StorageError)
Available on crate feature
storage only.An error communicating with storage.
Io(Error)
A generic IO error
Unknown
An unclear error
Trait Implementations§
source§impl Error for JobError
impl Error for JobError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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()
source§impl From<StorageError> for JobError
Available on crate feature storage only.
impl From<StorageError> for JobError
Available on crate feature
storage only.source§fn from(e: StorageError) -> Self
fn from(e: StorageError) -> Self
Converts to this type from the input type.
source§impl<T> Policy<JobRequest<T>, JobResult, JobError> for DefaultRetryPolicywhere
T: Clone,
Available on crate feature retry only.
impl<T> Policy<JobRequest<T>, JobResult, JobError> for DefaultRetryPolicywhere
T: Clone,
Available on crate feature
retry only.§type Future = Ready<DefaultRetryPolicy>
type Future = Ready<DefaultRetryPolicy>
The
Future type returned by Policy::retry.source§fn retry(
&self,
req: &JobRequest<T>,
result: Result<&JobResult, &JobError>
) -> Option<Self::Future>
fn retry(
&self,
req: &JobRequest<T>,
result: Result<&JobResult, &JobError>
) -> Option<Self::Future>
Check the policy if a certain request should be retried. Read more
source§fn clone_request(&self, req: &JobRequest<T>) -> Option<JobRequest<T>>
fn clone_request(&self, req: &JobRequest<T>) -> Option<JobRequest<T>>
Tries to clone a request before being passed to the inner service. Read more