Enum sarge::ArgParseError
source · #[non_exhaustive]pub enum ArgParseError {
UnknownFlag(String),
MissingValue(String),
ConsumedValue(String),
}Expand description
An error that occurred while parsing arguments, either CLI, environment variables, or provided.
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.
UnknownFlag(String)
A flag was encountered that wasn’t registered.
MissingValue(String)
A flag expected an accompanying value, but none was given.
ConsumedValue(String)
Multiple short flags in a cluster (e.g. -abc) tried to consume the
same value (e.g. -abc only_one_value).
Trait Implementations§
source§impl Clone for ArgParseError
impl Clone for ArgParseError
source§fn clone(&self) -> ArgParseError
fn clone(&self) -> ArgParseError
Returns a copy 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 Debug for ArgParseError
impl Debug for ArgParseError
source§impl Display for ArgParseError
impl Display for ArgParseError
source§impl Error for ArgParseError
impl Error for ArgParseError
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()
source§impl Hash for ArgParseError
impl Hash for ArgParseError
source§impl PartialEq for ArgParseError
impl PartialEq for ArgParseError
source§fn eq(&self, other: &ArgParseError) -> bool
fn eq(&self, other: &ArgParseError) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Eq for ArgParseError
impl StructuralPartialEq for ArgParseError
Auto Trait Implementations§
impl Freeze for ArgParseError
impl RefUnwindSafe for ArgParseError
impl Send for ArgParseError
impl Sync for ArgParseError
impl Unpin for ArgParseError
impl UnwindSafe for ArgParseError
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