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)

Tuple Fields

0: &'static str

A custom error.

Empty

Missing anything/everything.

NoArg

No trailing args.

NoSubCmd

Expected subcommand.

Passthru(i32)

Tuple Fields

0: i32

Miscellaneous Silent Failure.

This has no corresponding error text, but does have its own exit code.

TooManyArgs

Too many arguments.

TooManyKeys

Too many options defined.

WantsDynamicHelp(Option<Box<[u8]>>)

Tuple Fields

Wants subcommand help.

WantsHelp

Wants help.

WantsVersion

Wants version.

Implementations

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.

As Str.

Return as a string slice.

Trait Implementations

Performs the conversion.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.