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
sourceimpl 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 RefUnwindSafe for CaptureData
impl Send for CaptureData
impl Sync for CaptureData
impl Unpin for CaptureData
impl UnwindSafe for CaptureData
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more