Skip to main content

ProcessRunner

Trait ProcessRunner 

Source
pub trait ProcessRunner {
    // Required method
    fn run(&self, command: &Command) -> Result<Output, WrapperError>;
}
Expand description

Launches a Command. The Wrapper depends on this trait, not on std::process, so its logic is testable with MockRunner.

Required Methods§

Source

fn run(&self, command: &Command) -> Result<Output, WrapperError>

Run the command to completion and capture its output.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§