pub struct DefaultArgsParser;Expand description
Default implementation of args parser that parses CLI args using
clap.
Trait Implementations§
Source§impl ArgsParser for DefaultArgsParser
impl ArgsParser for DefaultArgsParser
Source§fn parse(args: impl IntoIterator<Item = OsString>) -> Args
fn parse(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(
args: impl IntoIterator<Item = OsString>,
) -> Result<Args, ProgramExit>
fn try_parse( args: impl IntoIterator<Item = OsString>, ) -> Result<Args, ProgramExit>
Auto Trait Implementations§
impl Freeze for DefaultArgsParser
impl RefUnwindSafe for DefaultArgsParser
impl Send for DefaultArgsParser
impl Sync for DefaultArgsParser
impl Unpin for DefaultArgsParser
impl UnwindSafe for DefaultArgsParser
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