pub struct Step<I, O> { /* private fields */ }Expand description
A typed operation in a sequential chain.
Implementations§
Source§impl<I, O> Step<I, O>
impl<I, O> Step<I, O>
Sourcepub fn new<F, Fut>(
id: impl Into<String>,
name: impl Into<String>,
execute: F,
) -> Self
pub fn new<F, Fut>( id: impl Into<String>, name: impl Into<String>, execute: F, ) -> Self
Create a typed chain step.
Sourcepub fn from_fn<F, Fut>(id: impl Into<String>, execute: F) -> Self
pub fn from_fn<F, Fut>(id: impl Into<String>, execute: F) -> Self
Create a typed chain step using id as the display name.
Sourcepub fn with_cleanup<F, Fut>(self, cleanup: F) -> Self
pub fn with_cleanup<F, Fut>(self, cleanup: F) -> Self
Register cleanup to run only if a later step fails or cancellation interrupts the chain.
Auto Trait Implementations§
impl<I, O> !RefUnwindSafe for Step<I, O>
impl<I, O> !UnwindSafe for Step<I, O>
impl<I, O> Freeze for Step<I, O>
impl<I, O> Send for Step<I, O>
impl<I, O> Sync for Step<I, O>
impl<I, O> Unpin for Step<I, O>
impl<I, O> UnsafeUnpin for Step<I, O>
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