Struct argonaut::ArgDef [] [src]

pub struct ArgDef<T: Borrow<str>> {
    pub deftype: DefType<T>,
    pub help: Option<T>,
}

The definition of one or more arguments to expect when parsing.

Fields

The type/data of the definition.

An optional help string.

Methods

impl<T: Borrow<str>> ArgDef<T>
[src]

Creates the definition for a positional argument with the given name.

Creates the definition for a trail of one or more arguments.

Creates the definition for a trail of zero or more arguments.

Starts creating a new optional argument with the given long name. This means that this definition is used when the name is given as an argument, prefixed with two dashes (eg. "help" => --help).

Starts creating a new optional argument with the given long name. This means that this definition is used when the name is given as an argument, prefixed with two dashes (eg. "help" => --help). The short argument is for single-character abbreviations (eg. "a" => -a).

Sets the help message for this argument.

Sets the parameter name for this argument (used for help messages).

Trait Implementations

impl<T: Debug + Borrow<str>> Debug for ArgDef<T>
[src]

Formats the value using the given formatter.

impl<T: Clone + Borrow<str>> Clone for ArgDef<T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more