Trait cage::command_runner::CommandRunner[][src]

pub trait CommandRunner {
    type Command: Command;
    fn build<S: AsRef<OsStr>>(&self, program: S) -> Self::Command;
}

A factory that produces objects conforming to our Command wrapper trait. During tests, we’ll use this to mock out the underlying system and record all commands executed.

Associated Types

type Command: Command[src]

The type of the commands we build. Must implement our custom Command trait.

Loading content...

Required methods

fn build<S: AsRef<OsStr>>(&self, program: S) -> Self::Command[src]

Build a new command.

Loading content...

Implementors

impl CommandRunner for OsCommandRunner[src]

type Command = OsCommand

fn build<S: AsRef<OsStr>>(&self, program: S) -> Self::Command[src]

impl CommandRunner for TestCommandRunner[src]

type Command = TestCommand

fn build<S: AsRef<OsStr>>(&self, program: S) -> Self::Command[src]

Loading content...