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 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.