Expand description
Low-level argument parsing for click-rs.
This module provides the internal option parser that handles the actual
parsing of command-line arguments. It is modeled after Python Click’s
parser.py and brings a similar but simplified API.
§Reference
Based on Python Click’s parser.py.
§Key Behaviors
--ends option parsing; remaining args are positional- Short options can be grouped:
-abc=-a -b -c - Short option with value:
-nfooor-n foo - Long option with value:
--name=fooor--name foo
Structs§
- Option
Parser - The main option parser.
Enums§
- Option
Action - Action to perform when an option is encountered.
- Parsed
Value - A parsed value from the command line.
Constants§
- NARGS_
OPTIONAL - Special nargs value indicating optional (? in Python Click). This is used internally to distinguish optional from 0.
Functions§
- split_
opt - Split an option string into its prefix and name.
Type Aliases§
- Parse
Result - Result type for parsing: (options, remaining args, parameter order).