pub trait Step: Send + Sync {
// Required methods
fn execute_with_context<'life0, 'life1, 'async_trait>(
&'life0 self,
input: StepInput,
ctx: ExecutionContext<'life1>,
) -> Pin<Box<dyn Future<Output = StepResult> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn name(&self) -> &str;
fn step_type(&self) -> StepType;
// Provided methods
fn execute<'life0, 'async_trait>(
&'life0 self,
input: StepInput,
) -> Pin<Box<dyn Future<Output = StepResult> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn description(&self) -> Option<&str> { ... }
fn get_branches(&self) -> Option<(&dyn Step, &dyn Step)> { ... }
fn get_sub_workflow(&self) -> Option<Workflow> { ... }
}Expand description
Step trait - all workflow steps must implement this
Required Methods§
Sourcefn execute_with_context<'life0, 'life1, 'async_trait>(
&'life0 self,
input: StepInput,
ctx: ExecutionContext<'life1>,
) -> Pin<Box<dyn Future<Output = StepResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute_with_context<'life0, 'life1, 'async_trait>(
&'life0 self,
input: StepInput,
ctx: ExecutionContext<'life1>,
) -> Pin<Box<dyn Future<Output = StepResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Execute with execution context (for event streaming, etc.)
Provided Methods§
Sourcefn execute<'life0, 'async_trait>(
&'life0 self,
input: StepInput,
) -> Pin<Box<dyn Future<Output = StepResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait>(
&'life0 self,
input: StepInput,
) -> Pin<Box<dyn Future<Output = StepResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute the step with the given input
Sourcefn description(&self) -> Option<&str>
fn description(&self) -> Option<&str>
Optional: Get a description of what this step does
Sourcefn get_branches(&self) -> Option<(&dyn Step, &dyn Step)>
fn get_branches(&self) -> Option<(&dyn Step, &dyn Step)>
For conditional steps: get the branches (then, else)
Sourcefn get_sub_workflow(&self) -> Option<Workflow>
fn get_sub_workflow(&self) -> Option<Workflow>
For sub-workflow steps: get the workflow