Enum clargs::ParsingError
[−]
[src]
pub enum ParsingError { Unrecognized(String), Ambiguous(String, Vec<String>), MissingArgument(String), ArgumentParsingError(String, String), 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
Unrecognized(String)
Indicates an unknown option was passed to the parser. The associated string is set to the affected option's name.
Ambiguous(String, Vec<String>)
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.
MissingArgument(String)
Indicates a named parameter is missing an argument. The associated string is set to the affected parameter's name.
ArgumentParsingError(String, String)
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.
ParameterRepetition(String)
Indicates a named parameter was set multiple times. The associated string is set to the affected parameter's name.
Methods
impl ParsingError
[src]
fn default_message(&self) -> String
[src]
Returns a default error message for the specified ParsingError
.
Trait Implementations
impl Debug for ParsingError
[src]
impl PartialEq for ParsingError
[src]
fn eq(&self, __arg_0: &ParsingError) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &ParsingError) -> bool
[src]
This method tests for !=
.
impl Eq for ParsingError
[src]
impl PartialOrd for ParsingError
[src]
fn partial_cmp(&self, __arg_0: &ParsingError) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &ParsingError) -> bool
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &ParsingError) -> bool
[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &ParsingError) -> bool
[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &ParsingError) -> bool
[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]
fn cmp(&self, __arg_0: &ParsingError) -> Ordering
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.22.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.22.0[src]
Compares and returns the minimum of two values. Read more