pub trait ProcessExec {
// Required method
fn exec(
&self,
cmd: &str,
args: &[String],
stdin: Option<&str>,
) -> Result<ProcessResult, Error>;
}Expand description
Abstraction over process spawning, allowing test mocks.
Required Methods§
Sourcefn exec(
&self,
cmd: &str,
args: &[String],
stdin: Option<&str>,
) -> Result<ProcessResult, Error>
fn exec( &self, cmd: &str, args: &[String], stdin: Option<&str>, ) -> Result<ProcessResult, Error>
Execute cmd with args, optionally piping stdin to the process.
Returns ProcessResult even on non-zero exit — the runner decides
whether a non-zero status is an error.