Captured output v0.1.0
What a program wrote and how it ended, kept by Command::Capture.
CapturedOutput
pub struct CapturedOutput {
// private fields
}
What a program wrote to its standard output and error, and how it finished. The bytes are kept as the program wrote them, which is usually but not always UTF-8. Not copied.
Methods
Status
pub func Status(self: &CapturedOutput) -> ExitStatus
How the program finished.
Returns: its exit status
Output
pub func Output(self: &CapturedOutput) -> char8[..]
Everything the program wrote to its standard output.
Returns: the bytes, valid while the captured output lives
Error
pub func Error(self: &CapturedOutput) -> char8[..]
Everything the program wrote to its standard error.
Returns: the bytes, valid while the captured output lives