pub struct RecordedBatch {
pub batch: JobBatch,
pub jobs: Vec<JobEnvelope>,
pub then: Option<JobEnvelope>,
pub catch: Option<JobEnvelope>,
pub finally: Option<JobEnvelope>,
}Expand description
A batch QueueFake recorded: the stored batch, its jobs and its
callbacks.
Fields§
§batch: JobBatchThe batch as a driver stores it when it is dispatched.
jobs: Vec<JobEnvelope>Its jobs, in order.
then: Option<JobEnvelope>The then callback.
catch: Option<JobEnvelope>The catch callback.
finally: Option<JobEnvelope>The finally callback.
Implementations§
Source§impl RecordedBatch
impl RecordedBatch
Sourcepub fn jobs_of<J: Job>(&self) -> Vec<J>
pub fn jobs_of<J: Job>(&self) -> Vec<J>
The batch’s jobs of type J, in order.
§Panics
When a recorded payload of type J does not deserialize as J.
Sourcepub fn catch_of<J: Job>(&self) -> Option<J>
pub fn catch_of<J: Job>(&self) -> Option<J>
Whether the batch’s catch callback is a J (decoded).
Sourcepub fn finally_of<J: Job>(&self) -> Option<J>
pub fn finally_of<J: Job>(&self) -> Option<J>
Whether the batch’s finally callback is a J (decoded).
Trait Implementations§
Source§impl Clone for RecordedBatch
impl Clone for RecordedBatch
Auto Trait Implementations§
impl Forget for RecordedBatch
impl Freeze for RecordedBatch
impl RefUnwindSafe for RecordedBatch
impl Send for RecordedBatch
impl Sync for RecordedBatch
impl Unpin for RecordedBatch
impl UnsafeUnpin for RecordedBatch
impl UnwindSafe for RecordedBatch
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ValueFor<Option<T>> for T
impl<T> ValueFor<Option<T>> for T
Source§fn into_value_for(self) -> Option<T>
fn into_value_for(self) -> Option<T>
The value as the column’s type.