pub struct Output { /* private fields */ }Expand description
Represents the output of an executed command.
Implementations§
Source§impl Output
impl Output
Sourcepub fn new(stdout: Vec<u8>, stderr: Vec<u8>, status: ExitStatus) -> Self
pub fn new(stdout: Vec<u8>, stderr: Vec<u8>, status: ExitStatus) -> Self
Creates a new Output from raw components.
Sourcepub fn status(&self) -> ExitStatus
pub fn status(&self) -> ExitStatus
Returns the exit status of the command.
Sourcepub fn stdout_str(&self) -> String
pub fn stdout_str(&self) -> String
Returns the stdout output as a string, lossily converting UTF-8 bytes.
Sourcepub fn stderr_str(&self) -> String
pub fn stderr_str(&self) -> String
Returns the stderr output as a string, lossily converting UTF-8 bytes.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Output
impl RefUnwindSafe for Output
impl Send for Output
impl Sync for Output
impl Unpin for Output
impl UnsafeUnpin for Output
impl UnwindSafe for Output
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