pub struct Capture {
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: ExitStatusExit status.
Implementations§
Source§impl Capture
impl Capture
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 Capture
impl RefUnwindSafe for Capture
impl Send for Capture
impl Sync for Capture
impl Unpin for Capture
impl UnwindSafe for Capture
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