Skip to main content

Executor

Trait Executor 

Source
pub trait Executor {
    // Required method
    fn execute(
        &mut self,
        pipeline: &Pipeline,
        scope: &mut Scope,
    ) -> EvalResult<ExecResult>;
}
Expand description

Trait for executing pipelines (command substitution).

This is implemented by higher layers (L6: Pipes & Jobs) to provide actual command execution. The evaluator calls this when it encounters a $(pipeline) expression.

Required Methods§

Source

fn execute( &mut self, pipeline: &Pipeline, scope: &mut Scope, ) -> EvalResult<ExecResult>

Execute a pipeline and return its result.

The executor should:

  1. Parse and execute the pipeline
  2. Capture stdout/stderr
  3. Return an ExecResult with code, output, and parsed data

Implementors§