Trait assert_cmd::output::OutputOkExt [−][src]
pub trait OutputOkExt where
Self: Sized, { fn ok(self) -> OutputResult; fn unwrap(self) -> Output { ... } fn unwrap_err(self) -> OutputError { ... } }
Expand description
Converts a type to an OutputResult
.
This is for example implemented on std::process::Output
.
Examples
use assert_cmd::prelude::*; use std::process::Command; let result = Command::new("echo") .args(&["42"]) .ok(); assert!(result.is_ok());
Required methods
fn ok(self) -> OutputResult
[src]
fn ok(self) -> OutputResult
[src]Convert an Output
to an OutputResult
.
Examples
use assert_cmd::prelude::*; use std::process::Command; let result = Command::new("echo") .args(&["42"]) .ok(); assert!(result.is_ok());
Provided methods
fn unwrap_err(self) -> OutputError
[src]
fn unwrap_err(self) -> OutputError
[src]Implementations on Foreign Types
impl OutputOkExt for Output
[src]
impl OutputOkExt for Output
[src]fn ok(self) -> OutputResult
[src]
impl<'c> OutputOkExt for &'c mut Command
[src]
impl<'c> OutputOkExt for &'c mut Command
[src]fn ok(self) -> OutputResult
[src]
fn unwrap_err(self) -> OutputError
[src]
Implementors
impl<'c> OutputOkExt for &'c mut assert_cmd::cmd::Command
[src]
impl<'c> OutputOkExt for &'c mut assert_cmd::cmd::Command
[src]