Enum clargs::ParsingError [] [src]

pub enum ParsingError {
    Unrecognized(String),
    Ambiguous(StringVec<String>),
    MissingArgument(String),
    ArgumentParsingError(StringString),
    ParameterRepetition(String),
}

Returned when an error occurs during parsing.

Indicates the type of error that occurred and contains some extra data about the error.

Variants

Indicates an unknown option was passed to the parser. The associated string is set to the affected option's name.

Indicates an argument could be multiple valid options. The associated string is set to the affected argument. The associated vector of strings is set to the valid options that the argument could have been.

Indicates a named parameter is missing an argument. The associated string is set to the affected parameter's name.

Indicates a named parameter's argument could not be parsed into the parameter's associated type. The first associated string is set to the affected parameter's name. The second associated string is set to the affected parameter's argument.

Indicates a named parameter was set multiple times. The associated string is set to the affected parameter's name.

Methods

impl ParsingError
[src]

[src]

Returns a default error message for the specified ParsingError.

Trait Implementations

impl Debug for ParsingError
[src]

[src]

Formats the value using the given formatter.

impl PartialEq for ParsingError
[src]

[src]

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

[src]

This method tests for !=.

impl Eq for ParsingError
[src]

impl PartialOrd for ParsingError
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

[src]

This method tests less than (for self and other) and is used by the < operator. Read more

[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Ord for ParsingError
[src]

[src]

This method returns an Ordering between self and other. Read more

1.22.0
[src]

Compares and returns the maximum of two values. Read more

1.22.0
[src]

Compares and returns the minimum of two values. Read more