Struct cradle::StdoutTrimmed [−][src]
pub struct StdoutTrimmed(pub String);
Expand description
See the CmdOutput
implementation for StdoutTrimmed
below.
Trait Implementations
Returns what the child process writes to stdout
, interpreted as utf-8,
collected into a string, trimmed of leading and trailing whitespace.
This also suppresses output of the child’s stdout
to the parent’s stdout
. (Which would be the default when not using StdoutTrimmed
as the return value.)
It’s recommended to pattern-match to get to the inner String
.
This will make sure that the return type can be inferred.
Here’s an example:
use std::path::Path; use cradle::*; let StdoutTrimmed(output) = cmd!(%"which ls"); assert!(Path::new(&output).exists());
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for StdoutTrimmed
impl Send for StdoutTrimmed
impl Sync for StdoutTrimmed
impl Unpin for StdoutTrimmed
impl UnwindSafe for StdoutTrimmed
Blanket Implementations
Mutably borrows from an owned value. Read more