Struct assert_cmd::OutputError [−][src]
pub struct OutputError { /* fields omitted */ }
Command
error.
Generally produced by OutputOkExt
.
Examples
use assert_cmd::prelude::*; use std::process::Command; let err = Command::main_binary() .unwrap() .env("exit", "42") .unwrap_err();
Methods
impl OutputError
[src]
impl OutputError
pub fn new(output: Output) -> Self
[src]
pub fn new(output: Output) -> Self
pub fn with_cause<E>(cause: E) -> Self where
E: Error + Send + Sync + 'static,
[src]
pub fn with_cause<E>(cause: E) -> Self where
E: Error + Send + Sync + 'static,
For errors that happen in creating a Output
.
pub fn set_cmd(self, cmd: String) -> Self
[src]
pub fn set_cmd(self, cmd: String) -> Self
Add the command line for additional context.
pub fn set_stdin(self, stdin: Vec<u8>) -> Self
[src]
pub fn set_stdin(self, stdin: Vec<u8>) -> Self
Add the stdin
for additional context.
pub fn as_output(&self) -> Option<&Output>
[src]
pub fn as_output(&self) -> Option<&Output>
Trait Implementations
impl Debug for OutputError
[src]
impl Debug for OutputError
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Error for OutputError
[src]
impl Error for OutputError
fn description(&self) -> &str
[src]
fn description(&self) -> &str
This method is soft-deprecated. Read more
fn cause(&self) -> Option<&Error>
[src]
fn cause(&self) -> Option<&Error>
The lower-level cause of this error, if any. Read more
impl Display for OutputError
[src]
impl Display for OutputError
Auto Trait Implementations
impl Send for OutputError
impl Send for OutputError
impl Sync for OutputError
impl Sync for OutputError