pub struct Sequence<Prev: Job, Next, F: FnOnce(Result<Prev::Output, Prev::Error>) -> Result<Next, Prev::Error> + Send + Sync> { /* private fields */ }Expand description
A struct representing a sequence where the second job is generated based on the first and the result is passed into its next function generator.
Trait Implementations§
Source§impl<Prev, Next, F> Job for Sequence<Prev, Next, F>
impl<Prev, Next, F> Job for Sequence<Prev, Next, F>
Source§async fn run(self) -> Result<Self::Output, Self::Error>
async fn run(self) -> Result<Self::Output, Self::Error>
Runs the sequence as a job and returns the result.
type Output = <Next as Job>::Output
Source§type Error = <Prev as Job>::Error
type Error = <Prev as Job>::Error
Job-specific error type. Must be convertible into a boxed error so
WorkManager does not need to be generic over the error.Auto Trait Implementations§
impl<Prev, Next, F> Freeze for Sequence<Prev, Next, F>
impl<Prev, Next, F> RefUnwindSafe for Sequence<Prev, Next, F>where
Prev: RefUnwindSafe,
F: RefUnwindSafe,
impl<Prev, Next, F> Send for Sequence<Prev, Next, F>
impl<Prev, Next, F> Sync for Sequence<Prev, Next, F>
impl<Prev, Next, F> Unpin for Sequence<Prev, Next, F>
impl<Prev, Next, F> UnwindSafe for Sequence<Prev, Next, F>where
Prev: UnwindSafe,
F: UnwindSafe,
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)