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

pub struct CmdRunner { /* fields omitted */ }

Run a command via cargo run

Implementations

impl CmdRunner[src]

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

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>, 
[src]

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>, 
[src]

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>, 
[src]

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
[src]

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).

pub fn run(&self) -> Process<'_>

Notable traits for Process<'cmd>

impl<'cmd> Write for Process<'cmd>
[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
[src]

impl<T> AsAny for T where
    T: Any
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<D> OwoColorize for D

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.