Struct cradle::output::Stderr [−][src]
pub struct Stderr(pub String);
Expand description
Stderr
allows to capture the stderr
of a child process:
use cradle::prelude::*;
// (`Status` is used here to suppress panics caused by `ls`
// terminating with a non-zero exit code.)
let (Stderr(stderr), Status(_)) = run_output!(%"ls does-not-exist");
assert!(stderr.contains("No such file or directory"));
This assumes that the output written to stderr
is encoded
as utf-8, and will error otherwise.
By default, what is written to stderr
by the child process
is relayed to the parent’s stderr
. However, when Stderr
is used, this is switched off.
Tuple Fields
0: String
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Stderr
impl UnwindSafe for Stderr
Blanket Implementations
Mutably borrows from an owned value. Read more