Skip to main content

CommandRunner

Trait CommandRunner 

Source
pub trait CommandRunner {
    // Required method
    fn run(
        &self,
        invocation: &DockerBuildInvocation,
    ) -> Result<CommandOutcome, CommandRunError>;
}
Expand description

The injectable side-effect seam: real runs shell out, tests record the invocation and return a canned outcome.

Required Methods§

Source

fn run( &self, invocation: &DockerBuildInvocation, ) -> Result<CommandOutcome, CommandRunError>

Run the invocation to completion, returning its typed outcome.

§Errors

Returns CommandRunError only if the process could not be spawned at all (e.g. the binary is missing) — a non-zero exit status is a normal (success: false) CommandOutcome, not an error.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§