pub struct CommandResult {
pub success: bool,
pub stdout: String,
pub stderr: String,
pub exit_code: Option<i32>,
}Expand description
Result of a shell command execution.
Fields§
§success: boolWhether the command exited successfully (exit code 0).
stdout: StringStandard output.
stderr: StringStandard error.
exit_code: Option<i32>Exit code, if available.
Implementations§
Source§impl CommandResult
impl CommandResult
Sourcepub fn require_success(&self) -> Result<&Self, PipelineError>
pub fn require_success(&self) -> Result<&Self, PipelineError>
Return a reference to self if successful, or an error if not.
§Errors
Returns an error containing stderr if the command failed.
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 · 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