pub trait CommandRunner: Send + Sync {
// Required method
fn spawn(&self, spec: &CommandSpec) -> Result<RunningCommand>;
// Provided method
fn spawn_server_receive_hook(
&self,
spec: &CommandSpec,
) -> Result<RunningCommand> { ... }
}Expand description
Spawns subprocesses; the only production implementation uses std::process::Command.
Required Methods§
Sourcefn spawn(&self, spec: &CommandSpec) -> Result<RunningCommand>
fn spawn(&self, spec: &CommandSpec) -> Result<RunningCommand>
Start spec and return a handle with stdio configured per the spec.
§Errors
Returns I/O errors from spawn or missing piped stdio when requested.
Provided Methods§
Sourcefn spawn_server_receive_hook(
&self,
spec: &CommandSpec,
) -> Result<RunningCommand>
fn spawn_server_receive_hook( &self, spec: &CommandSpec, ) -> Result<RunningCommand>
Spawn a server-side receive-pack hook subprocess (isolated process group on Unix).
Default implementation delegates to Self::spawn.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".