pub trait CommandRunner {
// Required method
fn run(&self, command: &str, args: &[String]) -> CommandRunOutput;
// Provided method
fn run_with_timeout(
&self,
command: &str,
args: &[String],
timeout: Duration,
) -> CommandRunOutput { ... }
}Required Methods§
fn run(&self, command: &str, args: &[String]) -> CommandRunOutput
Provided Methods§
Sourcefn run_with_timeout(
&self,
command: &str,
args: &[String],
timeout: Duration,
) -> CommandRunOutput
fn run_with_timeout( &self, command: &str, args: &[String], timeout: Duration, ) -> CommandRunOutput
Run with an upper bound; the process is killed once timeout passes.
Runners that cannot time out simply run the command.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".