Struct gong::options::Options[][src]

pub struct Options<'a> {
    pub long: Vec<LongOption<'a>>,
    pub short: Vec<ShortOption>,
    pub mode: OptionsMode,
    pub allow_abbreviations: bool,
}

Used to supply the set of information about available options to match against

Fields

Methods

impl<'a> Options<'a>
[src]

Create a new object. Takes estimations of the number of options to expect to be added (for efficient vector allocation).

Set mode

Enable/disable abbreviated matching

Add a long option

Panics (debug only) on invalid name.

Add a short option

Panics (debug only) on invalid char choice.

Add a long option that expects data

Panics (debug only) on invalid name.

Add a short option that expects data

Panics (debug only) on invalid char choice.

Checks validity of option set

Returns true if valid. Outputs details of problems found to stderr.

Trait Implementations

impl<'a> Debug for Options<'a>
[src]

Formats the value using the given formatter. Read more

impl<'a> Clone for Options<'a>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'a> PartialEq for Options<'a>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<'a> Eq for Options<'a>
[src]

impl<'a> Default for Options<'a>
[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations

impl<'a> Send for Options<'a>

impl<'a> Sync for Options<'a>