pub trait CommandRunner: Send + Sync {
// Required methods
fn run_captured(
&self,
command: &CommandSpec,
limits: CaptureLimits,
) -> CommandOutcome;
fn run_foreground(&self, command: &CommandSpec) -> Result<ExitStatus>;
}Expand description
Injectable boundary for all native command execution.
Required Methods§
Sourcefn run_captured(
&self,
command: &CommandSpec,
limits: CaptureLimits,
) -> CommandOutcome
fn run_captured( &self, command: &CommandSpec, limits: CaptureLimits, ) -> CommandOutcome
Execute with null stdin, concurrently drained stdout/stderr, and hard time/byte ceilings.
Sourcefn run_foreground(&self, command: &CommandSpec) -> Result<ExitStatus>
fn run_foreground(&self, command: &CommandSpec) -> Result<ExitStatus>
Spawn one child directly, with inherited stdin/stdout/stderr, then return its native exit status. Implementations must not retry or invoke a shell.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".