Function argonaut::parse
[−]
[src]
pub fn parse<'def, 'tar, T, P: Into<String>>(
program: P,
args: &[T],
definitions: Vec<ArgDef<'def, 'tar>>
) -> Result<Option<i32>, ParseError<'def>> where
T: Borrow<str>,
Parses the given arguments and updates the defined variables with them.
Errors are handled like this: - Invalid argument definitions (logic error): Panic. - Parse failed: Print usage and prevent the error from propagating. - Interrupt or sub parse failed: Just passed along.