pub struct ProcessOutput {
pub stdout: Vec<u8>,
pub stderr: Vec<u8>,
pub exit_code: Option<i32>,
pub timed_out: bool,
}Expand description
Output from a process execution.
This is a simplified output type for the ProcessRunner trait,
containing the essential information from process execution.
Fields§
§stdout: Vec<u8>Standard output from the process
stderr: Vec<u8>Standard error from the process
exit_code: Option<i32>Exit code from the process (None if terminated by signal)
timed_out: boolWhether the execution timed out
Implementations§
Source§impl ProcessOutput
impl ProcessOutput
Sourcepub fn new(
stdout: Vec<u8>,
stderr: Vec<u8>,
exit_code: Option<i32>,
timed_out: bool,
) -> Self
pub fn new( stdout: Vec<u8>, stderr: Vec<u8>, exit_code: Option<i32>, timed_out: bool, ) -> Self
Create a new ProcessOutput with the given values.
Sourcepub fn stdout_string(&self) -> String
pub fn stdout_string(&self) -> String
Get stdout as a UTF-8 string, lossy conversion.
Sourcepub fn stderr_string(&self) -> String
pub fn stderr_string(&self) -> String
Get stderr as a UTF-8 string, lossy conversion.
Trait Implementations§
Source§impl Clone for ProcessOutput
impl Clone for ProcessOutput
Source§fn clone(&self) -> ProcessOutput
fn clone(&self) -> ProcessOutput
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 ProcessOutput
impl RefUnwindSafe for ProcessOutput
impl Send for ProcessOutput
impl Sync for ProcessOutput
impl Unpin for ProcessOutput
impl UnsafeUnpin for ProcessOutput
impl UnwindSafe for ProcessOutput
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