Skip to main content

CommandRunner

Trait CommandRunner 

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

Abstraction over command execution, making state collection testable without requiring system tools to be installed.

Required Methods§

Source

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

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§