Struct argonaut::ParsedArgs
[−]
[src]
pub struct ParsedArgs<'a> { // some fields omitted }
The parsed arguments of a succesful parsing.
Methods
impl<'a> ParsedArgs<'a>
[src]
fn new(positional: Vec<&'a str>, singles: HashMap<OptName<'a>, Option<&'a str>>, multiples: HashMap<OptName<'a>, Option<Vec<&'a str>>>, switches: HashMap<OptName<'a>, bool>, aliases: HashMap<FlagName<'a>, OptName<'a>>) -> ParsedArgs<'a>
Creates a new set of parsed arguments.
fn long(&'a self, name: &'a str) -> ParsedArgsAccess<'a>
Accesses a flag with the given long name in the parsed arguments.
fn short(&'a self, name: char) -> ParsedArgsAccess<'a>
Accesses a flag with the given short name in the parsed arguments.
fn positional(&self, index: usize) -> Result<&'a str, String>
Returns the value of given positional argument.
fn trail(&self, from: usize) -> Result<&[&'a str], String>
Returns the arguments after the given position.