Struct argonaut::Arg [] [src]

pub struct Arg<'a> {
    // some fields omitted
}

An argument description for the parser. Use methods on 'arg' to create them.

Methods

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

fn help(self, help: &'a str) -> Self

Sets the help text for this argument.

fn positional(parameter: &'a str) -> Arg<'a>

Creates a positional argument with the given parameter name.

fn optional_trail(parameter: &'a str) -> Arg<'a>

Creates an argument that requires zero or more trailing parameters.

fn required_trail(parameter: &'a str) -> Arg<'a>

Creates an argument requires one or more trailing parameters.

fn short(name: char) -> OptArg<'a>

Creates a new optional argument with a short name (ex 'h' for -h).

fn long(name: &'a str) -> OptArg<'a>

Creates a new optional argument with a long name (ex "help" for --help).

fn short_and_long(short: char, long: &'a str) -> OptArg<'a>

Creates a new optional argument with both a short and a long name.

fn option_name(&self) -> Option<&OptName<'a>>

Returns the option name of this argument.

Trait Implementations

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

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

Formats the value using the given formatter.