Enum argyle::ArgyleError
source · pub enum ArgyleError {
Custom(&'static str),
Empty,
NoSubCmd,
Passthru(i32),
WantsDynamicHelp(Option<Box<[u8]>>),
WantsHelp,
WantsVersion,
}
Expand description
§Error Struct.
Variants§
Custom(&'static str)
A custom error.
Empty
Missing anything/everything.
NoSubCmd
Expected subcommand.
Passthru(i32)
Miscellaneous Silent Failure.
This has no corresponding error text, but does have its own exit code.
WantsDynamicHelp(Option<Box<[u8]>>)
Available on crate feature
dynamic-help
only.Wants subcommand help.
WantsHelp
Wants help.
WantsVersion
Wants version.
Implementations§
source§impl ArgyleError
impl ArgyleError
sourcepub const fn exit_code(&self) -> i32
pub const fn exit_code(&self) -> i32
§Exit code.
This returns the exit code for the error. Non-error errors like help
and version have a non-error exit code of 0
. ArgyleError::Passthru
returns whatever code was defined, while everything else just returns
1
.
Trait Implementations§
source§impl AsRef<str> for ArgyleError
impl AsRef<str> for ArgyleError
source§impl Clone for ArgyleError
impl Clone for ArgyleError
source§fn clone(&self) -> ArgyleError
fn clone(&self) -> ArgyleError
Returns a copy 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 ArgyleError
impl Debug for ArgyleError
source§impl Display for ArgyleError
impl Display for ArgyleError
source§impl Error for ArgyleError
impl Error for ArgyleError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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()
source§impl PartialEq for ArgyleError
impl PartialEq for ArgyleError
source§fn eq(&self, other: &ArgyleError) -> bool
fn eq(&self, other: &ArgyleError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for ArgyleError
impl StructuralPartialEq for ArgyleError
Auto Trait Implementations§
impl RefUnwindSafe for ArgyleError
impl Send for ArgyleError
impl Sync for ArgyleError
impl Unpin for ArgyleError
impl UnwindSafe for ArgyleError
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