pub struct InMemoryQueue { /* private fields */ }Implementations§
Source§impl InMemoryQueue
impl InMemoryQueue
Trait Implementations§
Source§impl Clone for InMemoryQueue
impl Clone for InMemoryQueue
Source§impl Debug for InMemoryQueue
impl Debug for InMemoryQueue
Source§impl Queue for InMemoryQueue
impl Queue for InMemoryQueue
fn push<'life0, 'async_trait>(
&'life0 self,
job: JobBox,
) -> Pin<Box<dyn Future<Output = Result<(), JobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn push_delayed<'life0, 'async_trait>(
&'life0 self,
job: JobBox,
delay_seconds: u64,
) -> Pin<Box<dyn Future<Output = Result<(), JobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn push_delayed<'life0, 'async_trait>(
&'life0 self,
job: JobBox,
delay_seconds: u64,
) -> Pin<Box<dyn Future<Output = Result<(), JobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Push a job that must not be processed before
delay_seconds have
elapsed. The default implementation pushes immediately; backends
that support delayed delivery override this.Source§fn pop<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<(JobBox, u64)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn pop<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<(JobBox, u64)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Pop the next available job together with the number of attempts it has
already consumed (including this one).
Source§fn release<'life0, 'async_trait>(
&'life0 self,
job: JobBox,
attempts: u64,
delay_seconds: u64,
) -> Pin<Box<dyn Future<Output = Result<(), JobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn release<'life0, 'async_trait>(
&'life0 self,
job: JobBox,
attempts: u64,
delay_seconds: u64,
) -> Pin<Box<dyn Future<Output = Result<(), JobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Requeue a job after a failed attempt, optionally delaying it by
delay_seconds. The default implementation re-pushes immediately.fn count<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = usize> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn name(&self) -> &str
Source§fn fail<'life0, 'async_trait>(
&'life0 self,
job: JobBox,
exception: String,
) -> Pin<Box<dyn Future<Output = Result<(), JobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn fail<'life0, 'async_trait>(
&'life0 self,
job: JobBox,
exception: String,
) -> Pin<Box<dyn Future<Output = Result<(), JobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Mark a job as permanently failed.
exception carries the failure
reason (mirrors Laravel’s queue.failer recording). The default
implementation drops the job.Source§fn job_succeeded<'life0, 'async_trait>(
&'life0 self,
_job: JobBox,
) -> Pin<Box<dyn Future<Output = Result<(), JobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn job_succeeded<'life0, 'async_trait>(
&'life0 self,
_job: JobBox,
) -> Pin<Box<dyn Future<Output = Result<(), JobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Called by the worker after a job finishes successfully. Queues that
track batch progress (e.g.
DatabaseQueue) override this.Auto Trait Implementations§
impl Freeze for InMemoryQueue
impl RefUnwindSafe for InMemoryQueue
impl Send for InMemoryQueue
impl Sync for InMemoryQueue
impl Unpin for InMemoryQueue
impl UnsafeUnpin for InMemoryQueue
impl UnwindSafe for InMemoryQueue
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Event for T
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more