Enum arg::ParseError

source ·
pub enum ParseError<'a> {
    HelpRequested(&'static str),
    TooManyArgs,
    RequiredArgMissing(&'a str),
    MissingValue(&'a str),
    InvalidFlagValue(&'a str, &'a str),
    InvalidArgValue(&'a str, &'a str),
    UnknownFlag(&'a str),
}
Expand description

Parse errors

Variants§

§

HelpRequested(&'static str)

User requested help.

Contains slice with Args::HELP

§

TooManyArgs

Too many arguments are specified.

§

RequiredArgMissing(&'a str)

Argument is required, but missing

Contains name of argument

§

MissingValue(&'a str)

Flag is specified, but value is missing.

Contains full flag name.

§

InvalidFlagValue(&'a str, &'a str)

Flag is specified with invalid value

Contains full flag name and provided value.

§

InvalidArgValue(&'a str, &'a str)

Argument is supplied with invalid vlaue

Contains argument name and provided value.

§

UnknownFlag(&'a str)

Unknown flag is specified.

Implementations§

Returns whether help is requested

Trait Implementations§

Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.