[][src]Trait rustwide::cmd::Runnable

pub trait Runnable {
    fn name(&self) -> Binary;

    fn prepare_command<'w, 'pl>(
        &self,
        cmd: Command<'w, 'pl>
    ) -> Command<'w, 'pl> { ... } }

Trait representing a command that can be run by Command.

Required methods

fn name(&self) -> Binary

The name of the binary to execute.

Loading content...

Provided methods

fn prepare_command<'w, 'pl>(&self, cmd: Command<'w, 'pl>) -> Command<'w, 'pl>

Prepare the command for execution. This method is called as soon as a Command instance is created, and allows tweaking the command to better suit your binary, for example by adding default arguments or environment variables.

The default implementation simply returns the provided command without changing anything in it.

Loading content...

Implementations on Foreign Types

impl<'a> Runnable for &'a str[src]

impl Runnable for String[src]

impl<'a, B: Runnable> Runnable for &'a B[src]

Loading content...

Implementors

Loading content...