pub trait StepExecutor: Send + Sync {
// Required method
fn execute<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
step: &'life1 DagWorkflowStep,
input: &'life2 str,
step_results: &'life3 HashMap<String, StepResult>,
loop_state: Option<&'life4 LoopState>,
) -> Pin<Box<dyn Future<Output = Result<StepResult, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait;
}Expand description
A step executor trait that allows testing the DAG engine without real LLM calls.
Required Methods§
Sourcefn execute<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
step: &'life1 DagWorkflowStep,
input: &'life2 str,
step_results: &'life3 HashMap<String, StepResult>,
loop_state: Option<&'life4 LoopState>,
) -> Pin<Box<dyn Future<Output = Result<StepResult, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn execute<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
step: &'life1 DagWorkflowStep,
input: &'life2 str,
step_results: &'life3 HashMap<String, StepResult>,
loop_state: Option<&'life4 LoopState>,
) -> Pin<Box<dyn Future<Output = Result<StepResult, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Execute a single step and return its result.