Skip to main content

CommandRunner

Trait CommandRunner 

Source
pub trait CommandRunner {
    // Required method
    fn run(
        &self,
        program: &OsStr,
        arguments: &[OsString],
    ) -> Result<CommandOutput>;
}
Expand description

Injectable boundary around process execution.

Required Methods§

Source

fn run(&self, program: &OsStr, arguments: &[OsString]) -> Result<CommandOutput>

Run one executable with already-separated arguments.

§Errors

Returns an I/O error when the executable cannot be started or waited.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§