pub struct ArgParser<'a> { /* private fields */ }Expand description
Keep information about the argument parser.
Implementations§
Source§impl<'a> ArgParser<'a>
impl<'a> ArgParser<'a>
Sourcepub fn arg(self, argument: Argument<'a>) -> Self
pub fn arg(self, argument: Argument<'a>) -> Self
Add an argument with its associated Argument in arguments.
Sourcepub fn parse_from_cmdline(&mut self) -> Result<()>
pub fn parse_from_cmdline(&mut self) -> Result<()>
Parse the command line arguments.
Sourcepub fn formatted_help(&self) -> String
pub fn formatted_help(&self) -> String
Concatenate the help information of every possible argument
in a message that represents the correct command line usage
for the application.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for ArgParser<'a>
impl<'a> RefUnwindSafe for ArgParser<'a>
impl<'a> Send for ArgParser<'a>
impl<'a> Sync for ArgParser<'a>
impl<'a> Unpin for ArgParser<'a>
impl<'a> UnwindSafe for ArgParser<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more