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 positional(name: &'a str) -> Arg<'a>

Creates a positional argument with the given parameter name.

fn optional_trail() -> Arg<'a>

Creates an argument that requires zero or more trailing parameters.

fn required_trail() -> Arg<'a>

Creates an argument requires one or more trailing parameters.

fn named_and_short(name: &'a str, short: char) -> OptArg<'a>

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

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

Creates a new optional argument with the given flag name. (ex "help" for --help).

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.