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
WorkerCrashed
A background worker has crashed.
Failed(Box<dyn StdError + Send + Sync + 'static>)
An error occured during execution.
Storage(StorageError)
storage only.An error communicating with storage.
Io(Error)
A generic IO error
Unknown
An unclear error
Trait Implementations
sourceimpl Error for JobError
impl Error for JobError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<StorageError> for JobError
Available on crate feature storage only.
impl From<StorageError> for JobError
storage only.sourcefn from(e: StorageError) -> Self
fn from(e: StorageError) -> Self
Converts to this type from the input type.
sourceimpl<T> Policy<JobRequest<T>, JobResult, JobError> for DefaultRetryPolicy where
T: Clone,
Available on crate feature retry only.
impl<T> Policy<JobRequest<T>, JobResult, JobError> for DefaultRetryPolicy where
T: Clone,
retry only.type Future = Ready<DefaultRetryPolicy>
type Future = Ready<DefaultRetryPolicy>
The Future type returned by Policy::retry.
sourcefn 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
sourcefn 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more