Struct getopts::OptGroup [−] [src]

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

: use the crates.io getopts library instead

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

Fields

short_name
Unstable

: use the crates.io getopts library instead

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

long_name
Unstable

: use the crates.io getopts library instead

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

hint
Unstable

: use the crates.io getopts library instead

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

desc
Unstable

: use the crates.io getopts library instead

Description for usage help text

hasarg
Unstable

: use the crates.io getopts library instead

Whether option has an argument

occur
Unstable

: use the crates.io getopts library instead

How often it can occur

Methods

impl OptGroup

fn long_to_short(&self) -> Opt

Unstable

: use the crates.io getopts library instead

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)