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§
Sourcefn execute(
&mut self,
pipeline: &Pipeline,
scope: &mut Scope,
) -> EvalResult<ExecResult>
fn execute( &mut self, pipeline: &Pipeline, scope: &mut Scope, ) -> EvalResult<ExecResult>
Execute a pipeline and return its result.
The executor should:
- Parse and execute the pipeline
- Capture stdout/stderr
- Return an ExecResult with code, output, and parsed data