anyhow_std/process/output.rs
1use crate::process::ExitStatus;
2
3/// Isomorphic to [std::process::Output] except replacing `status` with the [ExitStatus] wrapper
4#[derive(Debug)]
5pub struct Output {
6 pub status: ExitStatus,
7 pub stdout: Vec<u8>,
8 pub stderr: Vec<u8>,
9}
10
11impl Output {
12 pub(crate) fn wrap(output: std::process::Output, cmddesc: String) -> Self {
13 Output {
14 status: ExitStatus::from((output.status, cmddesc)),
15 stdout: output.stdout,
16 stderr: output.stderr,
17 }
18 }
19}