pub struct CommandResult {
pub exit_code: i32,
pub stdout: String,
pub stderr: String,
pub duration: Duration,
}Expand description
Result of a command execution
Fields§
§exit_code: i32§stdout: String§stderr: String§duration: DurationImplementations§
Source§impl CommandResult
impl CommandResult
Sourcepub fn stdout_contains(&self, pattern: &str) -> bool
pub fn stdout_contains(&self, pattern: &str) -> bool
Check if stdout contains a pattern
Sourcepub fn stderr_contains(&self, pattern: &str) -> bool
pub fn stderr_contains(&self, pattern: &str) -> bool
Check if stderr contains a pattern
Sourcepub fn combined_output(&self) -> String
pub fn combined_output(&self) -> String
Get combined output (stdout + stderr)
Trait Implementations§
Source§impl Clone for CommandResult
impl Clone for CommandResult
Source§fn clone(&self) -> CommandResult
fn clone(&self) -> CommandResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CommandResult
impl RefUnwindSafe for CommandResult
impl Send for CommandResult
impl Sync for CommandResult
impl Unpin for CommandResult
impl UnsafeUnpin for CommandResult
impl UnwindSafe for CommandResult
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