pub struct ExitCode(/* private fields */);Available on crate feature
process only.Expand description
Error type for commands that intentionally terminate with a specific process exit code.
This lets an xtask command communicate meaningful statuses to shell scripts while
still using anyhow::Result internally:
if true {
return Err(xtask_kit::process::ExitCode::new(2).into());
}Implementations§
Trait Implementations§
Source§impl Error for ExitCode
impl Error for ExitCode
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Forget for ExitCode
impl Freeze for ExitCode
impl Move for ExitCode
impl RefUnwindSafe for ExitCode
impl Send for ExitCode
impl Sync for ExitCode
impl Unpin for ExitCode
impl UnsafeUnpin for ExitCode
impl UnwindSafe for ExitCode
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