Struct gong::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]

[src]

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

[src]

Set mode

[src]

Enable/disable abbreviated matching

[src]

Add a long option

Panics (debug only) on invalid name.

[src]

Add a short option

Panics (debug only) on invalid char choice.

[src]

Add a long option that expects data

Panics (debug only) on invalid name.

[src]

Add a short option that expects data

Panics (debug only) on invalid char choice.

[src]

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]

[src]

Formats the value using the given formatter.

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

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

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

[src]

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

[src]

This method tests for !=.

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