Struct cradle::Split [−][src]
pub struct Split<'a>(pub &'a str);
Expand description
See the CmdArgument
implementation for Split
below.
Trait Implementations
Splits the contained string by whitespace (using split_whitespace
)
and uses the resulting words as separate arguments.
use cradle::*; let StdoutTrimmed(output) = cmd!(Split("echo foo")); assert_eq!(output, "foo");
Since this is such a common case, cradle
also provides a syntactic shortcut
for Split
, the %
symbol:
use cradle::*; let StdoutTrimmed(output) = cmd!(%"echo foo"); assert_eq!(output, "foo");
Auto Trait Implementations
impl<'a> RefUnwindSafe for Split<'a>
impl<'a> UnwindSafe for Split<'a>