#[non_exhaustive]pub enum QueueError {
Serialize(Error),
Backend(Box<dyn Error + Send + Sync>),
}Expand description
A failure enqueuing a job through a JobProducer (or
the push convenience over it).
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.
Serialize(Error)
The job could not be serialized to its JSON wire form.
Backend(Box<dyn Error + Send + Sync>)
The backend rejected or failed the enqueue. The concrete backend
failure is the source, kept opaque so the producer contract stays
backend-agnostic.
Implementations§
Source§impl QueueError
impl QueueError
Sourcepub fn backend<E>(source: E) -> Self
pub fn backend<E>(source: E) -> Self
Wrap a backend-specific enqueue failure as QueueError::Backend. A
backend calls this to surface its concrete error (an apalis/Redis error,
an SQS SDK error, …) without this crate naming the type — e.g.
storage.push(job).await.map_err(QueueError::backend)?.
Trait Implementations§
Source§impl Debug for QueueError
impl Debug for QueueError
Source§impl Display for QueueError
impl Display for QueueError
Source§impl Error for QueueError
impl Error for QueueError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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()
Auto Trait Implementations§
impl !RefUnwindSafe for QueueError
impl !UnwindSafe for QueueError
impl Freeze for QueueError
impl Send for QueueError
impl Sync for QueueError
impl Unpin for QueueError
impl UnsafeUnpin for QueueError
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