cargo_parse_args_or_exit

Function cargo_parse_args_or_exit 

Source
pub fn cargo_parse_args_or_exit<T: TopLevelCommand>() -> T
Expand description

Create a FromArgs type from the current process’s env::args_os().

This special cases usages where argp is being used in an environment where cargo is driving the build. We skip the second env variable.

This function will exit early from the current process if argument parsing was unsuccessful or if information like --help was requested. Error messages will be printed to stderr, and --help output to stdout.