#[non_exhaustive]pub enum ParseError<'a> {
NotAKey(&'a str),
UnknownKey(&'a str),
_Unknown,
}Expand description
Errors occurred during parsing the command line.
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.
NotAKey(&'a str)
expected a key, but argument didn’t start with a dash
UnknownKey(&'a str)
key is not accepted
_Unknown
Trait Implementations§
Source§impl<'a> Clone for ParseError<'a>
impl<'a> Clone for ParseError<'a>
Source§fn clone(&self) -> ParseError<'a>
fn clone(&self) -> ParseError<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for ParseError<'a>
impl<'a> Debug for ParseError<'a>
Source§impl Display for ParseError<'_>
impl Display for ParseError<'_>
Source§impl Error for ParseError<'_>
impl Error for ParseError<'_>
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
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl<'a> Hash for ParseError<'a>
impl<'a> Hash for ParseError<'a>
Source§impl<'a> PartialEq for ParseError<'a>
impl<'a> PartialEq for ParseError<'a>
impl<'a> Eq for ParseError<'a>
impl<'a> StructuralPartialEq for ParseError<'a>
Auto Trait Implementations§
impl<'a> Freeze for ParseError<'a>
impl<'a> RefUnwindSafe for ParseError<'a>
impl<'a> Send for ParseError<'a>
impl<'a> Sync for ParseError<'a>
impl<'a> Unpin for ParseError<'a>
impl<'a> UnwindSafe for ParseError<'a>
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