pub struct PushedBatch(/* private fields */);Expand description
A batch that a QueueFake recorded, or a batch that’s a step of a chain, with its jobs,
name, and options.
Implementations§
Source§impl PushedBatch
impl PushedBatch
Sourcepub const fn id(&self) -> BatchId
pub const fn id(&self) -> BatchId
The batch’s ID, which awaiting the batch’s dispatch returned.
Sourcepub fn jobs(&self) -> JobList
pub fn jobs(&self) -> JobList
The batch’s jobs, in the order they were given. For a chain in the batch, the list holds the chain’s first job.
Sourcepub fn chain(&self, index: usize) -> JobList
pub fn chain(&self, index: usize) -> JobList
The jobs chained after the batch’s job at index, in the order they’ll run.
The list is empty for a job that isn’t a chain.
Sourcepub fn then(&self) -> CallbackList
pub fn then(&self) -> CallbackList
The callbacks the batch calls once every one of its jobs has succeeded.
Sourcepub fn catch(&self) -> CallbackList
pub fn catch(&self) -> CallbackList
The callbacks the batch calls when the first of its jobs fails for good.
Sourcepub fn finally(&self) -> CallbackList
pub fn finally(&self) -> CallbackList
The callbacks the batch calls once every one of its jobs has run.
Sourcepub const fn allows_failures(&self) -> bool
pub const fn allows_failures(&self) -> bool
Whether the batch keeps running when a job fails for good.
Sourcepub fn connection(&self) -> Option<&str>
pub fn connection(&self) -> Option<&str>
The connection the batch sends its jobs to, or None if it didn’t choose one.
Trait Implementations§
Source§impl Clone for PushedBatch
impl Clone for PushedBatch
Source§fn clone(&self) -> PushedBatch
fn clone(&self) -> PushedBatch
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for PushedBatch
impl !UnwindSafe for PushedBatch
impl Forget for PushedBatch
impl Freeze for PushedBatchwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Chain>: Freeze,
PhantomData<EncodedCallback>: Freeze,
PhantomData<Link>: Freeze,
impl Move for PushedBatch
impl Send for PushedBatch
impl Sync for PushedBatch
impl Unpin for PushedBatch
impl UnsafeUnpin for PushedBatchwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Chain>: UnsafeUnpin,
PhantomData<EncodedCallback>: UnsafeUnpin,
PhantomData<Link>: UnsafeUnpin,
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> ErasedDestructor for Twhere
T: 'static,
Source§impl<K> ForeignKey<K> for K
impl<K> ForeignKey<K> for K
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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 moreCreates a shared type from an unshared type.