pub trait CommandRunner: Send {
// Required methods
fn run(
&self,
program: &str,
args: &[String],
env: &[(String, String)],
) -> Result<CommandOutcome>;
fn as_any(&self) -> &dyn Any;
}Expand description
Spawn seam: production uses ProcessRunner; tests inject a
FakeRunner that records argv/env without spawning anything.
Required Methods§
fn run( &self, program: &str, args: &[String], env: &[(String, String)], ) -> Result<CommandOutcome>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".