Struct gumdrop::Error
[−]
[src]
pub struct Error { /* fields omitted */ }
Represents an error encountered during argument parsing
Methods
impl Error
[src]
fn failed_parse(opt: Opt, err: String) -> Error
[src]
Returns an error for a failed attempt at parsing an option value.
fn insufficient_arguments(opt: Opt, expected: usize, found: usize) -> Error
[src]
Returns an error for an option expecting two or more arguments not receiving the expected number of arguments.
fn unexpected_argument(opt: Opt) -> Error
[src]
Returns an error for an option receiving an unexpected argument value,
e.g. --option=value
.
fn unexpected_single_argument(opt: Opt, n: usize) -> Error
[src]
Returns an error for an option expecting two or more argument values
receiving only one in the long form, e.g. --option=value
.
These options must be passed as, e.g. --option value second-value [...]
.
fn missing_argument(opt: Opt) -> Error
[src]
Returns an error for a missing required argument.
fn missing_command() -> Error
[src]
Returns an error for a missing command name.
fn unexpected_free(arg: &str) -> Error
[src]
Returns an error when a free argument was encountered, but the options type does not support free arguments.
fn unrecognized_command(name: &str) -> Error
[src]
Returns an error for an unrecognized command.
fn unrecognized_option(opt: Opt) -> Error
[src]
Returns an error for an unrecognized option.
fn unrecognized_long(opt: &str) -> Error
[src]
Returns an error for an unrecognized long option, e.g. --option
.
fn unrecognized_short(opt: char) -> Error
[src]
Returns an error for an unrecognized short option, e.g. -o
.
Trait Implementations
impl Debug for Error
[src]
impl Display for Error
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more