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
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CaptureData
impl RefUnwindSafe for CaptureData
impl Send for CaptureData
impl Sync for CaptureData
impl Unpin for CaptureData
impl UnwindSafe for CaptureData
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more