pub trait ExecutionMode: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn execute(
&self,
ctx: &mut dyn ExecutionContext,
recipe: &Recipe,
run_dir: &Path,
) -> Result<ExecutionResult, ExecutionError>;
}Expand description
Public execution-mode trait.
Implementations receive &mut dyn ExecutionContext and must not downcast
to a concrete runner. This is enforced by taking a trait object.
Required Methods§
Sourcefn execute(
&self,
ctx: &mut dyn ExecutionContext,
recipe: &Recipe,
run_dir: &Path,
) -> Result<ExecutionResult, ExecutionError>
fn execute( &self, ctx: &mut dyn ExecutionContext, recipe: &Recipe, run_dir: &Path, ) -> Result<ExecutionResult, ExecutionError>
Execute the recipe, returning steps, assertions, raw output, exit code, and screen.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".