#[non_exhaustive]
pub enum Style {
Null,
Pos,
Cmd,
Main,
Boolean,
Argument,
Combined,
Reserve(u64),
}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(base on 1 !!!).
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.
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.
Reserve(u64)
Reserve using for user define style option.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Style
impl<'de> Deserialize<'de> for Style
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Ord for Style
impl Ord for Style
source§impl PartialEq<Style> for Style
impl PartialEq<Style> for Style
source§impl PartialOrd<Style> for Style
impl PartialOrd<Style> 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 more