Enum argyle::ArgyleError [−][src]
pub enum ArgyleError { Custom(&'static str), Empty, NoArg, NoSubCmd, Passthru(i32), TooManyArgs, TooManyKeys, WantsDynamicHelp(Option<Box<[u8]>>), WantsHelp, WantsVersion, }
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]
#[must_use]pub const fn exit_code(&self) -> i32
[src]
#[must_use]
pub const fn exit_code(&self) -> i32Exit 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
.
#[must_use]pub const fn as_str(&self) -> &'static str
[src]
#[must_use]
pub const fn as_str(&self) -> &'static strAs Str.
Return as a string slice.
Trait Implementations
impl AsRef<str> for ArgyleError
[src]
impl Clone for ArgyleError
[src]
fn clone(&self) -> ArgyleError
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ArgyleError
[src]
impl Display for ArgyleError
[src]
impl Error 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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,