Enum apalis_core::error::JobError
source · #[non_exhaustive]pub enum JobError {
Failed(Box<dyn StdError + Send + Sync + 'static>),
Storage(StorageError),
Io(Error),
IntParseError(TryFromIntError),
MissingContext(String),
}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.
Failed(Box<dyn StdError + Send + Sync + 'static>)
An error occurred during execution.
Storage(StorageError)
Available on crate feature
storage only.An error communicating with storage.
Io(Error)
A generic IO error
IntParseError(TryFromIntError)
A parse error occurred during execution.
MissingContext(String)
A job is missing some context and yet it was requested during execution.
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
impl From<StorageError> for JobError
source§fn from(source: StorageError) -> Self
fn from(source: StorageError) -> Self
Converts to this type from the input type.
source§impl From<TryFromIntError> for JobError
impl From<TryFromIntError> for JobError
source§fn from(source: TryFromIntError) -> Self
fn from(source: TryFromIntError) -> Self
Converts to this type from the input type.
source§impl<T, Res> Policy<JobRequest<T>, Res, JobError> for DefaultRetryPolicywhere
T: Clone,
Available on crate feature retry only.
impl<T, Res> Policy<JobRequest<T>, Res, 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<&Res, &JobError>
) -> Option<Self::Future>
fn retry( &self, req: &JobRequest<T>, result: Result<&Res, &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
Auto Trait Implementations§
impl !RefUnwindSafe for JobError
impl Send for JobError
impl Sync for JobError
impl Unpin for JobError
impl !UnwindSafe for JobError
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