pub enum Exit {
Success,
Failure,
Usage,
}Expand description
Process outcome of an odx command, mapped to a stable exit code.
| Variant | Code | Meaning |
|---|---|---|
Exit::Success | 0 | the command did what was asked |
Exit::Failure | 1 | operational failure: conflict, network, policy |
Exit::Usage | 2 | usage or configuration error |
use odx_core::Exit;
assert_eq!(Exit::Success.code(), 0);
assert_eq!(Exit::Failure.code(), 1);
assert_eq!(Exit::Usage.code(), 2);Variants§
Success
The command succeeded.
Failure
An operational failure, such as a merge conflict or a network error.
Usage
A usage or configuration error.
Implementations§
Trait Implementations§
impl Copy for Exit
impl Eq for Exit
impl StructuralPartialEq for Exit
Auto Trait Implementations§
impl Freeze for Exit
impl RefUnwindSafe for Exit
impl Send for Exit
impl Sync for Exit
impl Unpin for Exit
impl UnsafeUnpin for Exit
impl UnwindSafe for Exit
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