pub struct SubprocessOutput {
pub stdout: Vec<u8>,
pub stderr: Vec<u8>,
pub status_code: i32,
}Expand description
Output from a subprocess execution
Fields§
§stdout: Vec<u8>Standard output bytes
stderr: Vec<u8>Standard error bytes
status_code: i32Exit status code (0 typically indicates success)
Implementations§
Source§impl SubprocessOutput
impl SubprocessOutput
Sourcepub fn success(&self) -> bool
pub fn success(&self) -> bool
Returns true if the subprocess exited successfully (status code 0)
Sourcepub fn stdout_lossy(&self) -> String
pub fn stdout_lossy(&self) -> String
Returns stdout as a UTF-8 string, lossy converting invalid bytes
Sourcepub fn stderr_lossy(&self) -> String
pub fn stderr_lossy(&self) -> String
Returns stderr as a UTF-8 string, lossy converting invalid bytes
Trait Implementations§
Source§impl Clone for SubprocessOutput
impl Clone for SubprocessOutput
Source§fn clone(&self) -> SubprocessOutput
fn clone(&self) -> SubprocessOutput
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SubprocessOutput
impl RefUnwindSafe for SubprocessOutput
impl Send for SubprocessOutput
impl Sync for SubprocessOutput
impl Unpin for SubprocessOutput
impl UnsafeUnpin for SubprocessOutput
impl UnwindSafe for SubprocessOutput
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