#[non_exhaustive]pub enum NameMatcher {
Exact,
AsciiCaseInsensitive,
}Expand description
Controls how flag names are matched when parsing.
§Why #[non_exhaustive]
NameMatcher is only used as an input parameter to parsing APIs, never
returned as a result.
#[non_exhaustive] is appropriate here because new matcher variants can
then be added in minor releases without breaking callers.
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.
Exact
Matches flag names exactly.
AsciiCaseInsensitive
Matches flag names using ASCII case-insensitive comparison.
Implementations§
Trait Implementations§
Source§impl Clone for NameMatcher
impl Clone for NameMatcher
impl Copy for NameMatcher
Source§impl Debug for NameMatcher
impl Debug for NameMatcher
impl Eq for NameMatcher
Source§impl Hash for NameMatcher
impl Hash for NameMatcher
Source§impl Ord for NameMatcher
impl Ord for NameMatcher
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for NameMatcher
impl PartialEq for NameMatcher
Source§impl PartialOrd for NameMatcher
impl PartialOrd for NameMatcher
impl StructuralPartialEq for NameMatcher
Auto Trait Implementations§
impl Freeze for NameMatcher
impl RefUnwindSafe for NameMatcher
impl Send for NameMatcher
impl Sync for NameMatcher
impl Unpin for NameMatcher
impl UnsafeUnpin for NameMatcher
impl UnwindSafe for NameMatcher
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