#[non_exhaustive]pub enum Style {
Null,
Pos,
Cmd,
Main,
Boolean,
Argument,
Combined,
Flag,
}Expand description
Option style
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.
Null
Pos
The style indicate the NOA are set base on position.
Cmd
The style indicate the NOA are set in first position(@1).
Main
The Main style NOA no need set, its callback will always be called.
Boolean
The style indicate option don’t need argument, such as --boolean, -b or with no prefix b.
Using it with Boolean.
Argument
The style indicate the option need an argument, such as --int=42, -i 42 or --str=foo.
Combined
The style indicate option support set multiple option in one string, such as -ade means set -a, -d and -e.
Flag
The style indicate option don’t need argument, such as --boolean, -b or with no prefix b.
Using it with Flag.
Trait Implementations§
source§impl Ord for Style
impl Ord for Style
source§impl PartialEq for Style
impl PartialEq for Style
source§impl PartialOrd for Style
impl PartialOrd for Style
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl Copy for Style
impl Eq for Style
impl StructuralPartialEq for Style
Auto Trait Implementations§
impl Freeze for Style
impl RefUnwindSafe for Style
impl Send for Style
impl Sync for Style
impl Unpin for Style
impl UnwindSafe for Style
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