pub trait SubprocessRuntime: Send + Sync {
// Required method
fn run_command(
&self,
program: &str,
args: &[&str],
stdin: Option<&[u8]>,
) -> Result<SubprocessOutput, SubprocessError>;
}Expand description
Abstraction trait for subprocess execution.
Required Methods§
Sourcefn run_command(
&self,
program: &str,
args: &[&str],
stdin: Option<&[u8]>,
) -> Result<SubprocessOutput, SubprocessError>
fn run_command( &self, program: &str, args: &[&str], stdin: Option<&[u8]>, ) -> Result<SubprocessOutput, SubprocessError>
Execute a command with the given arguments and optional stdin.
Implementors§
impl SubprocessRuntime for MockSubprocessRuntime
impl SubprocessRuntime for OsSubprocessRuntime
Available on non-WebAssembly only.