pub struct CommandOutput {
status: CommandStatus,
stdout: Option<Vec<u8>>,
stderr: Option<Vec<u8>>,
}
Expand description
Represents the output of an executed process.
Fields§
§status: CommandStatus
§stdout: Option<Vec<u8>>
§stderr: Option<Vec<u8>>
Implementations§
source§impl CommandOutput
impl CommandOutput
pub fn did_not_start(stdout: OutputMode, stderr: OutputMode) -> Self
pub fn from_output( output: Output, stdout: OutputMode, stderr: OutputMode, ) -> Self
pub fn is_success(&self) -> bool
pub fn is_failure(&self) -> bool
pub fn status(&self) -> Option<ExitStatus>
pub fn stdout(&self) -> String
pub fn stdout_if_present(&self) -> Option<String>
pub fn stdout_if_ok(&self) -> Option<String>
pub fn stderr(&self) -> String
pub fn stderr_if_present(&self) -> Option<String>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CommandOutput
impl RefUnwindSafe for CommandOutput
impl Send for CommandOutput
impl Sync for CommandOutput
impl Unpin for CommandOutput
impl UnwindSafe for CommandOutput
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
§impl<T> Pointable for T
impl<T> Pointable for T
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 56 bytes