pub struct ClapArgsParser { /* private fields */ }Expand description
Default implementation of args parser that parses CLI args using
clap.
Implementations§
Trait Implementations§
Source§impl ArgsParser for ClapArgsParser
impl ArgsParser for ClapArgsParser
Source§fn parse(&self, args: impl IntoIterator<Item = OsString>) -> Args
fn parse(&self, args: impl IntoIterator<Item = OsString>) -> Args
Parses given cli args and perform basic error handling.
- If the underlying
ProgramExitcontains aProgramExit::styled_message, it will be printed instead ofProgramExit::message. - Will exit using
ProgramExit::exit_statusif anyProgramExitreceived. - Will print to stderr on error, to stdout on early exit (i.e. version, author, help options)
See ArgsParser::parse for more infos.
Source§fn try_parse(
&self,
args: impl IntoIterator<Item = OsString>,
) -> Result<Args, ProgramExit>
fn try_parse( &self, args: impl IntoIterator<Item = OsString>, ) -> Result<Args, ProgramExit>
Auto Trait Implementations§
impl Freeze for ClapArgsParser
impl !RefUnwindSafe for ClapArgsParser
impl Send for ClapArgsParser
impl Sync for ClapArgsParser
impl Unpin for ClapArgsParser
impl UnsafeUnpin for ClapArgsParser
impl !UnwindSafe for ClapArgsParser
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