Skip to main content

try_parse

Function try_parse 

Source
pub fn try_parse<T: Parser, I: IntoIterator>(iter: I) -> Option<T>
where I::Item: Into<OsString> + Clone,
Available on crate features cli and print only.
Expand description

Try to parse arguments from an iterator and print the error/help on failure.

Whether the output has color depends on the main CLI --color option. This is useful for implementing custom command parser within an application.