pub struct ArgumentParser<'src: 'run, 'run> { /* private fields */ }
Expand description
The argument parser is responsible for grouping positional arguments into argument groups, which consist of a path to a recipe and its arguments.
Argument parsing is substantially complicated by the fact that recipe paths can be given on the command line as multiple arguments, i.e., โfooโ โbarโ bazโ, or as a single โ::โ-separated argument.
Error messages produced by the argument parser should use the format of the recipe path as passed on the command line.
Additionally, if a recipe is specified with a โ::โ-separated path, extra
components of that path after a valid recipe must not be used as arguments,
whereas arguments after multiple argument path may be used as arguments. As
an example, foo bar baz
may refer to recipe foo::bar
with argument
baz
, but foo::bar::baz
is an error, since bar
is a recipe, not a
module.