Struct gumdrop::Parser
[−]
[src]
pub struct Parser<'a, S: 'a> { /* fields omitted */ }Parses options from a series of &str-like values.
Methods
impl<'a, S: 'a + AsRef<str>> Parser<'a, S>[src]
fn new(args: &'a [S], style: ParsingStyle) -> Parser<'a, S>
Returns a new parser for the given series of arguments.
The given slice should not contain the program name as its first element.
fn next_opt(&mut self) -> Option<Opt<'a>>
Returns the next option or None if no options remain.
If the previous option had an explicit argument, e.g. --option=argument,
which was not consumed by a call to next_arg(), an error will be
returned indicating that the argument was ignored.
fn next_arg(&mut self) -> Option<&'a str>
Returns the next argument to an option or None if none remain.
Trait Implementations
impl<'a, S: 'a> Clone for Parser<'a, S>[src]
fn clone(&self) -> Parser<'a, S>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more