Skip to main content

Runner

Trait Runner 

Source
pub trait Runner: Send + Sync {
    // Required method
    fn run(&self, cmd: &str, args: &[&str]) -> Result<RunOutcome, Error>;
}
Expand description

Abstraction over process execution so tests can verify behaviour without invoking real system commands.

Required Methods§

Source

fn run(&self, cmd: &str, args: &[&str]) -> Result<RunOutcome, Error>

Run cmd with args. Returns a RunOutcome on success, or an I/O error if the process could not be spawned at all.

Implementors§