Struct getopts::OptGroupUnstable [-] [+] [src]

pub struct OptGroup {
    pub short_name: String,
    pub long_name: String,
    pub hint: String,
    pub desc: String,
    pub hasarg: HasArg,
    pub occur: Occur,
}

One group of options, e.g., both -h and --help, along with their shared description and properties.

Fields

short_name

Short name of the option, e.g. h for a -h option

long_name

Long name of the option, e.g. help for a --help option

hint

Hint for argument, e.g. FILE for a -o FILE option

desc

Description for usage help text

hasarg

Whether option has an argument

occur

How often it can occur

Methods

impl OptGroup

fn long_to_short(&self) -> Opt

Translate OptGroup into Opt. (Both short and long names correspond to different Opts).

Trait Implementations

Derived Implementations

impl Debug for OptGroup

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl Eq for OptGroup

impl PartialEq for OptGroup

fn eq(&self, __arg_0: &OptGroup) -> bool

fn ne(&self, __arg_0: &OptGroup) -> bool

impl Clone for OptGroup

fn clone(&self) -> OptGroup

fn clone_from(&mut self, source: &Self)