Enum argyle::ArgyleError [−][src]
pub enum ArgyleError { Custom(&'static str), Empty, NoArg, NoSubCmd, Passthru(i32), TooManyArgs, TooManyKeys, WantsDynamicHelp(Option<Box<[u8]>>), WantsHelp, WantsVersion, }
Expand description
Variants
Custom(&'static str)
A custom error.
Missing anything/everything.
No trailing args.
Expected subcommand.
Passthru(i32)
Miscellaneous Silent Failure.
This has no corresponding error text, but does have its own exit code.
Too many arguments.
Too many options defined.
Wants subcommand help.
Wants help.
Wants version.
Implementations
impl ArgyleError
[src]
impl ArgyleError
[src]#[must_use]pub const fn exit_code(&self) -> i32
[src]
#[must_use]pub const fn exit_code(&self) -> i32
[src]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
impl Clone for ArgyleError
[src]
impl Clone for ArgyleError
[src]fn clone(&self) -> ArgyleError
[src]
fn clone(&self) -> ArgyleError
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Debug for ArgyleError
[src]
impl Debug for ArgyleError
[src]impl Display for ArgyleError
[src]
impl Display for ArgyleError
[src]impl Error for ArgyleError
[src]
impl Error for ArgyleError
[src]fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]
fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]The lower-level source of this error, if any. Read more
fn backtrace(&self) -> Option<&Backtrace>
[src]
fn backtrace(&self) -> Option<&Backtrace>
[src]backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
fn description(&self) -> &str
1.0.0[src]
fn description(&self) -> &str
1.0.0[src]use the Display impl or to_string()
impl PartialEq<ArgyleError> for ArgyleError
[src]
impl PartialEq<ArgyleError> for ArgyleError
[src]fn eq(&self, other: &ArgyleError) -> bool
[src]
fn eq(&self, other: &ArgyleError) -> bool
[src]This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &ArgyleError) -> bool
[src]
fn ne(&self, other: &ArgyleError) -> bool
[src]This method tests for !=
.
impl Eq for ArgyleError
[src]
impl StructuralEq for ArgyleError
[src]
impl StructuralPartialEq for ArgyleError
[src]
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
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more