Struct subprocess::CaptureData
source · pub struct CaptureData {
pub stdout: Vec<u8>,
pub stderr: Vec<u8>,
pub exit_status: ExitStatus,
}
Expand description
Data captured by Exec::capture
and Pipeline::capture
.
Fields§
§stdout: Vec<u8>
Standard output as bytes.
stderr: Vec<u8>
Standard error as bytes.
exit_status: ExitStatus
Exit status.
Implementations§
source§impl CaptureData
impl CaptureData
sourcepub fn stdout_str(&self) -> String
pub fn stdout_str(&self) -> String
Returns the standard output as string, converted from bytes using
String::from_utf8_lossy
.
sourcepub fn stderr_str(&self) -> String
pub fn stderr_str(&self) -> String
Returns the standard error as string, converted from bytes using
String::from_utf8_lossy
.