pub enum ArgError {
MissingArgument,
UnexpectedArgument(String),
ParseError(Box<dyn StdError>),
}
Expand description
An error when parsing an argument of an option or parameter.
Variants§
MissingArgument
Required argument is missing.
UnexpectedArgument(String)
An unexpected argument has been found (e.g. for a flag).
ParseError(Box<dyn StdError>)
Error parsing the string to the required argument type.
Trait Implementations§
source§impl Error for ArgError
impl Error for ArgError
source§fn cause(&self) -> Option<&dyn StdError>
fn cause(&self) -> Option<&dyn StdError>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for ArgError
impl !Send for ArgError
impl !Sync for ArgError
impl Unpin for ArgError
impl !UnwindSafe for ArgError
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