Struct abscissa::options::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]
impl<'a, S: 'a + AsRef<str>> Parser<'a, S>
pub fn new(args: &'a [S], style: ParsingStyle) -> Parser<'a, S>
[src]
pub 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.
pub fn next_opt(&mut self) -> Option<Opt<'a>>
[src]
pub 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.
pub fn next_arg(&mut self) -> Option<&'a str>
[src]
pub fn next_arg(&mut self) -> Option<&'a str>
Returns the next argument to an option or None
if none remain.