Crate utf8_command
source ·Expand description
Provides the Utf8Output
type, a UTF-8-decoded variant of std::process::Output
(as
produced by std::process::Command::output
).
Construct Utf8Output
from Output
via the TryInto
or TryFrom
traits:
let output: Utf8Output = Command::new("echo")
.arg("puppy")
.output()
.unwrap()
.try_into()
.unwrap();
assert_eq!(
output,
Utf8Output {
status: ExitStatus::default(),
stdout: String::from("puppy\n"),
stderr: String::from(""),
},
);
Structs§
- A UTF-8-decoded variant of
std::process::Output
(as produced bystd::process::Command::output
).