Skip to main content

Step

Trait Step 

Source
pub trait Step: Send + Sync {
    // Required methods
    fn id(&self) -> &str;
    fn execute<'life0, 'life1, 'async_trait>(
        &'life0 self,
        ctx: &'life1 mut WorkflowContext,
    ) -> Pin<Box<dyn Future<Output = Result<StepOutput, WorkflowError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

A single execution unit in a workflow.

Required Methods§

Source

fn id(&self) -> &str

Returns the unique identifier for this step.

Source

fn execute<'life0, 'life1, 'async_trait>( &'life0 self, ctx: &'life1 mut WorkflowContext, ) -> Pin<Box<dyn Future<Output = Result<StepOutput, WorkflowError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Executes the step with the given workflow context.

Implementors§

Source§

impl<S: Step + 'static> Step for ConditionalStep<S>