Skip to main content

Runner

Trait Runner 

Source
pub trait Runner: Send + Sync {
    // Required method
    fn run(
        &self,
        program: &str,
        args: &[&str],
        remove: &[&str],
        timeout: Duration,
    ) -> Result<String, String>;
}
Expand description

Runs a CLI, injectable so tests fake the external process boundary.

Required Methods§

Source

fn run( &self, program: &str, args: &[&str], remove: &[&str], timeout: Duration, ) -> Result<String, String>

Runs program from the PATH with args and without the remove variables, and returns stdout on success. Errors never include output.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§