use crate::cook::orchestrator::ExecutionEnvironment;
use anyhow::Result;
use async_trait::async_trait;
use super::{ExtendedWorkflowConfig, StepResult, WorkflowContext, WorkflowStep};
#[async_trait]
pub trait StepExecutor: Send + Sync {
async fn execute_step(
&mut self,
step: &WorkflowStep,
env: &ExecutionEnvironment,
context: &mut WorkflowContext,
) -> Result<StepResult>;
}
#[async_trait]
pub trait WorkflowExecutor: StepExecutor {
async fn execute(
&mut self,
workflow: &ExtendedWorkflowConfig,
env: &ExecutionEnvironment,
) -> Result<()>;
}