Skip to main content

Module command

Module command 

Source
Expand description

Typed docker build invocation + the mockable command-runner seam.

Per the fleet’s TYPED EMISSION rule, the subprocess argv is built via typed .arg() calls on DockerBuildInvocation — never string concatenation — and every consumer of the invocation (real subprocess, or a test’s recording mock) goes through the CommandRunner trait so the fallback path is provable without ever shelling out in a unit test.

Structs§

CommandOutcome
The outcome of running a DockerBuildInvocation — never a panic, a typed exit status + captured output either way.
DockerBuildInvocation
One docker build (or docker buildx build) invocation, built up via typed setters rather than any string template.
MockCommandRunner
A recording mock runner for tests — never spawns a real process. Records every invocation it was asked to run and returns a pre-scripted outcome (defaulting to success with empty output).
RealCommandRunner
The production runner — shells out to the real docker binary via std::process::Command.

Enums§

CommandRunError
Errors launching the subprocess itself (not the subprocess’s own exit status — that is captured in CommandOutcome).

Traits§

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