[][src]Struct abscissa_core::testing::CmdRunner

pub struct CmdRunner { /* fields omitted */ }

Run a command via cargo run


impl CmdRunner[src]

pub fn target_bin<S>(bin: S) -> Self where
    S: Into<OsString>, 

Run a target binary via cargo by passing --bin to cargo run.

Use CmdRunner::default() if you only have one target binary in your Cargo workspace.

pub fn new<S>(program: S) -> Self where
    S: Into<OsString>, 

Create a new command runner which runs an arbitrary program at the given path.

pub fn arg<S>(&mut self, arg: S) -> &mut Self where
    S: Into<OsString>, 

Append an argument to the set of arguments to run

pub fn args<I, S>(&mut self, args: I) -> &mut Self where
    I: IntoIterator<Item = S>,
    S: Into<OsString>, 

Append multiple arguments to the set of arguments to run

pub fn capture_stdout(&mut self) -> &mut Self[src]

Enable capturing of standard output

pub fn capture_stderr(&mut self) -> &mut Self[src]

Enable capturing of standard error

pub fn config<C>(&mut self, config: &C) -> &mut Self where
    C: Serialize

Add the given configuration file

pub fn exclusive(&mut self) -> &mut Self[src]

Serialize invocations of this command using a mutex

pub fn quiet(&mut self) -> &mut Self[src]

Disable printing a + run: ... logline when running command

pub fn timeout(&mut self, duration: Duration) -> &mut Self[src]

Set the timeout after which the command should complete.

By default CargoRunner timeout will be used (30 minutes).

Important traits for Process<'cmd>
pub fn run(&self) -> Process[src]

Run the given subcommand

pub fn status(&self) -> ExitStatus[src]

Get the exit status for the given subcommand

Trait Implementations

impl Clone for CmdRunner[src]

impl Debug for CmdRunner[src]

impl Default for CmdRunner[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> AsAny for T where
    T: Any

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> Erased for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.