Struct assert_cmd::StdInCommand[][src]

pub struct StdInCommand<'a> { /* fields omitted */ }

Command that carries the stdin buffer.

Create a StdInCommand through the CommandStdInExt trait.

Examples

use assert_cmd::prelude::*;

use std::process::Command;

Command::new("cat")
    .with_stdin()
    .buffer("42")
    .unwrap();

Methods

impl<'a> StdInCommand<'a>
[src]

Executes the Command as a child process, waiting for it to finish and collecting all of its output.

By default, stdout and stderr are captured (and used to provide the resulting output). Stdin is not inherited from the parent and any attempt by the child process to read from the stdin stream will result in the stream immediately closing.

(mirrors Command::output)

Trait Implementations

impl<'a> Debug for StdInCommand<'a>
[src]

Formats the value using the given formatter. Read more

impl<'c, 'a> OutputOkExt for &'c mut StdInCommand<'a>
[src]

Convert an [Output][Output] to an [OutputResult][OutputResult]. Read more

Unwrap a [Output][Output] but with a prettier message than ok().err().unwrap(). Read more

Unwrap a [Output][Output] but with a prettier message than .ok().unwrap(). Read more

impl<'c> OutputAssertExt for &'c mut StdInCommand<'c>
[src]

Wrap with an interface for that provides assertions on the [Output]. Read more

Auto Trait Implementations

impl<'a> Send for StdInCommand<'a>

impl<'a> !Sync for StdInCommand<'a>