pub trait CommandExecutor: Send + Sync {
// Required methods
fn execute(&self, command: Command) -> Result<Output>;
fn dyn_clone(&self) -> Box<dyn CommandExecutor>;
}Expand description
Executes Commands.
Required Methods§
Sourcefn execute(&self, command: Command) -> Result<Output>
fn execute(&self, command: Command) -> Result<Output>
Runs a command and captures its standard output and standard error.
Sourcefn dyn_clone(&self) -> Box<dyn CommandExecutor>
fn dyn_clone(&self) -> Box<dyn CommandExecutor>
Creates an owned executor that can be moved to another thread.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".