pub enum CommandResult {
Success,
Error(String),
}Expand description
Result of command execution.
Like Unix exit codes: commands return status only.
Side effects go through runtime.signal().
Variants§
Success
Command executed successfully (exit code 0).
Error(String)
Command failed with an error message (non-zero exit).
Implementations§
Source§impl CommandResult
impl CommandResult
Sourcepub const fn is_success(&self) -> bool
pub const fn is_success(&self) -> bool
Check if the result is success.
Sourcepub fn error(msg: &str) -> CommandResult
pub fn error(msg: &str) -> CommandResult
Create an error result with a message.
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 moreSource§impl Debug for CommandResult
impl Debug for CommandResult
Source§impl PartialEq for CommandResult
impl PartialEq for CommandResult
impl Eq for CommandResult
impl StructuralPartialEq for CommandResult
Auto 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