Skip to main content

StepExecutor

Trait StepExecutor 

Source
pub trait StepExecutor {
    // Required methods
    fn execute_template(
        &self,
        step: &TemplateStep,
        ctx: &RunContext,
    ) -> Result<StepResult, MacroRunError>;
    fn execute_capture(
        &self,
        step: &CaptureStep,
        ctx: &RunContext,
    ) -> Result<StepResult, MacroRunError>;
    fn execute_shell(
        &self,
        step: &ShellStep,
        ctx: &RunContext,
    ) -> Result<StepResult, MacroRunError>;
}
Expand description

Trait for executing individual macro steps.

This allows the CLI/TUI to provide their own implementations that integrate with their error handling and UI.

Required Methods§

Source

fn execute_template( &self, step: &TemplateStep, ctx: &RunContext, ) -> Result<StepResult, MacroRunError>

Execute a template step.

Source

fn execute_capture( &self, step: &CaptureStep, ctx: &RunContext, ) -> Result<StepResult, MacroRunError>

Execute a capture step.

Source

fn execute_shell( &self, step: &ShellStep, ctx: &RunContext, ) -> Result<StepResult, MacroRunError>

Execute a shell step.

Implementors§