pub struct ExecutionResult {
pub script_name: String,
pub stdout: String,
pub stderr: String,
pub exit_code: i32,
pub duration: Duration,
}Expand description
Result of executing a script
Fields§
§script_name: String§stdout: String§stderr: String§exit_code: i32§duration: DurationImplementations§
Source§impl ExecutionResult
impl ExecutionResult
Sourcepub fn is_success(&self) -> bool
pub fn is_success(&self) -> bool
Check if the execution was successful (exit code 0)
Sourcepub fn get_output(&self) -> String
pub fn get_output(&self) -> String
Get the output, preferring stdout but falling back to stderr if stdout is empty
Trait Implementations§
Source§impl Clone for ExecutionResult
impl Clone for ExecutionResult
Source§fn clone(&self) -> ExecutionResult
fn clone(&self) -> ExecutionResult
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 ExecutionResult
impl RefUnwindSafe for ExecutionResult
impl Send for ExecutionResult
impl Sync for ExecutionResult
impl Unpin for ExecutionResult
impl UnwindSafe for ExecutionResult
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