#[non_exhaustive]pub enum ErrorKind {
Show 15 variants
Backtrack,
UnknownFlag,
UnexpectedArg,
MissingValue,
UnexpectedValue,
MissingRequired,
MissingArgument,
MissingSubcommand,
Conflict,
MissingOneOf,
RequiresDoubleDash,
HelpRequested,
VersionRequested,
InvalidValue,
InvalidChoice,
}Expand description
The class of failure.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Backtrack
A parser did not match here; another one may.
UnknownFlag
A flag-like word matched no flag.
UnexpectedArg
A word nothing could hold.
MissingValue
A flag needing a value did not get one.
UnexpectedValue
A flag that takes no value was given one: --verbose=yes.
MissingRequired
A required flag never appeared.
MissingArgument
A required positional argument was never filled.
MissingSubcommand
A required subcommand was not given.
Conflict
Two arguments that exclude each other were both given.
MissingOneOf
A required group had none of its members.
RequiresDoubleDash
A word reached an argument that only takes words after --.
HelpRequested
-h/--help, or a bare invocation of an arg_required_else_help
command: show Error::render_help rather than report a failure.
VersionRequested
-V/--version: show Error::version_text.
InvalidValue
A value that its type rejected.
InvalidChoice
A value outside a fixed set.
Trait Implementations§
impl Copy for ErrorKind
impl Eq for ErrorKind
impl StructuralPartialEq for ErrorKind
Auto Trait Implementations§
impl Freeze for ErrorKind
impl RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl UnsafeUnpin for ErrorKind
impl UnwindSafe for ErrorKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more