pub struct Parser<'a> { /* private fields */ }
Expand description
The command line parser.
Implementations
sourceimpl<'a> Parser<'a>
impl<'a> Parser<'a>
sourcepub fn opt<T>(&mut self, var: T) -> &mut Opt<'a>where
T: 'a + CommandLineArgument,
pub fn opt<T>(&mut self, var: T) -> &mut Opt<'a>where
T: 'a + CommandLineArgument,
Add and return an option.
var
is the associated variable
sourcepub fn param<T>(&mut self, var: T) -> &mut Param<'a>where
T: 'a + CommandLineArgument,
pub fn param<T>(&mut self, var: T) -> &mut Param<'a>where
T: 'a + CommandLineArgument,
Add and return a parameter.
var
is the associated variable
sourcepub fn auto_shorts(&mut self, auto_shorts: bool)
pub fn auto_shorts(&mut self, auto_shorts: bool)
Set whether short options should be generated automatically.
sourcepub fn command_name(&mut self, command_name: &'a str)
pub fn command_name(&mut self, command_name: &'a str)
Set the command name.
Trait Implementations
Auto Trait Implementations
impl<'a> !RefUnwindSafe for Parser<'a>
impl<'a> !Send for Parser<'a>
impl<'a> !Sync for Parser<'a>
impl<'a> Unpin for Parser<'a>
impl<'a> !UnwindSafe for Parser<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more