[−][src]Struct assert_cmd::stdin::StdInCommand
Command
that carries the stdin
buffer.
Create a StdInCommand
through the CommandStdInExt
trait.
Examples
use assert_cmd::prelude::*; use std::process::Command; let mut cmd = Command::new("cat"); cmd .arg("-et"); cmd .with_stdin() .buffer("42") .assert() .stdout("42");
Methods
impl<'a> StdInCommand<'a>
[src]
pub fn output(&mut self) -> Result<Output>
[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<'c> OutputAssertExt for &'c mut StdInCommand<'c>
[src]
impl<'c, 'a> OutputOkExt for &'c mut StdInCommand<'a>
[src]
fn ok(self) -> OutputResult
[src]
fn unwrap_err(self) -> OutputError
[src]
fn unwrap(self) -> Output
[src]
Unwrap a [Output
][Output] but with a prettier message than .ok().unwrap()
. Read more
impl<'a> Debug for StdInCommand<'a>
[src]
Auto Trait Implementations
impl<'a> Send for StdInCommand<'a>
impl<'a> !Sync for StdInCommand<'a>
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,