pub enum Fail {
ArgumentMissing(String),
UnrecognizedOption(String),
OptionMissing(String),
OptionDuplicated(String),
UnexpectedArgument(String),
}
Expand description
The type returned when the command line does not conform to the
expected format. Use the Debug
implementation to output detailed
information.
Variants§
ArgumentMissing(String)
The option requires an argument but none was passed.
UnrecognizedOption(String)
The passed option is not declared among the possible options.
OptionMissing(String)
A required option is not present.
OptionDuplicated(String)
A single occurrence option is being used multiple times.
UnexpectedArgument(String)
There’s an argument being passed to a non-argument option.
Trait Implementations§
source§impl Error for Fail
impl Error for Fail
source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
impl Eq for Fail
impl StructuralPartialEq for Fail
Auto Trait Implementations§
impl Freeze for Fail
impl RefUnwindSafe for Fail
impl Send for Fail
impl Sync for Fail
impl Unpin for Fail
impl UnwindSafe for Fail
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)