pub struct FlowBuilder { /* private fields */ }
Expand description
Builder for creating flows with a fluent API
Implementations§
Source§impl FlowBuilder
impl FlowBuilder
Sourcepub fn named_step<Fut, F>(self, name: &'static str, f: F) -> Self
pub fn named_step<Fut, F>(self, name: &'static str, f: F) -> Self
Adds a named step to the flow with automatic logging
Sourcepub fn step_if<Fut, F, Cond>(self, cond: Cond, f: F) -> Self
pub fn step_if<Fut, F, Cond>(self, cond: Cond, f: F) -> Self
Adds a conditional step that only executes if the condition is met
Sourcepub fn wait_until<Cond>(
self,
cond: Cond,
interval: Duration,
max_retry: usize,
) -> Self
pub fn wait_until<Cond>( self, cond: Cond, interval: Duration, max_retry: usize, ) -> Self
Adds a wait step that waits until a condition is met
Sourcepub fn into_steps(self) -> Vec<Step> ⓘ
pub fn into_steps(self) -> Vec<Step> ⓘ
Access steps for runtime extensions
Sourcepub async fn execute(self) -> Result<FlowContext>
pub async fn execute(self) -> Result<FlowContext>
Builds and executes the flow immediately
Sourcepub async fn execute_with_context(
self,
context: FlowContext,
) -> Result<FlowContext>
pub async fn execute_with_context( self, context: FlowContext, ) -> Result<FlowContext>
Builds and executes the flow with a custom context
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FlowBuilder
impl !RefUnwindSafe for FlowBuilder
impl Send for FlowBuilder
impl !Sync for FlowBuilder
impl Unpin for FlowBuilder
impl !UnwindSafe for FlowBuilder
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