Skip to main content

StepExecutor

Trait StepExecutor 

Source
pub trait StepExecutor: Send + Sync {
    // Required method
    fn execute<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        step: &'life1 WorkflowStep,
        context: &'life2 Value,
    ) -> Pin<Box<dyn Future<Output = Result<StepResult, String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;

    // Provided methods
    fn supports(&self, _requirement: &StepRequirement) -> bool { ... }
    fn available_skills(&self) -> Vec<StepRequirement> { ... }
}
Expand description

Execute a single workflow step.

Required Methods§

Source

fn execute<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, step: &'life1 WorkflowStep, context: &'life2 Value, ) -> Pin<Box<dyn Future<Output = Result<StepResult, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Execute one step given the step definition and workflow context.

Provided Methods§

Source

fn supports(&self, _requirement: &StepRequirement) -> bool

Check if this executor can satisfy a requirement. Default: true (backward compatible — accepts everything).

Source

fn available_skills(&self) -> Vec<StepRequirement>

Informational: list skills this executor provides. Used by UI for introspection, not for execution gating.

Implementors§