Structs§
- Command
Line Parser - Command line parser is able to parse process arguments. Arguments could be of two types, single character argument (i.g -c) or long text argument (i.g. –config-file) Process argument could be of the following type: Boolean - classic is -h to show process help, Integer - an integer value for example verbosity level –verbose 5, Floating point - a floating point numer –ratio=123.25, String - a text argument, classic configuration file path –config-file app.properties. Integer, Floating point and String option has a mandatory angument while Boolean option does not require an argument. Argument can be passed in two ways: –config-file=config/app.properties for example or –config-file config/app.properties the same example is valid for single character options for example -c=onfig/app.properties or -c onfig/app.properties. Single character option can be pass grouped together (i.g -xvz). Be carful if a single character argument needs an argument you have to pass it or adding = and the value (i.g. -xvzf=file_to_compress.tar.gz) or as next process argument (i.g -xvzf file_to_compress.tar.gz). No more than a single character option with a mandatory argument can be grouped.
- Command
Line Parser Error - Command line option error representation. This struct is returned by all command line parser methods in case of error you can print its representation simply using {} placeholder in the rust macros
Enums§
- Parsing
Mode - Command line parser parsing mode DefaultParsingMode mode means that - - option is treated like all other option PositionalArgumentsMode menas that all the options after - - are positional argument that user can pass to a process launched by your application
Constants§
- BOOLEAN_
OPTION_ MISMATCH_ VALUE_ SET_ ERROR_ IDX - CMD_
LINE_ OPTION_ ERROR_ NUM - FPOINT_
OPTION_ MISMATCH_ VALUE_ SET_ ERROR_ IDX - INTEGER_
OPTION_ MISMATCH_ VALUE_ SET_ ERROR_ IDX - LONG_
OPTION_ ALREADY_ EXISTS_ ERROR_ IDX - MANDATORY_
OPTION_ HAS_ NOT_ SET_ ERROR_ IDX - MISSING_
OPTION_ ARGUMENT_ ERROR_ IDX - OPTION_
ALREADY_ EXISTS_ ERROR_ IDX - Error message indexes if you want to set error message in your language follow the indexes order see CommandLineParser::new associated function example
- OPTION_
ARGUMENT_ ALREADY_ ASSIGNED_ ERROR_ IDX - OPTION_
IDENTIFIER_ NOT_ FOUND_ ERROR_ IDX - OPTION_
IS_ NOT_ OF_ REQUIRED_ TYPE_ ERROR_ IDX - OPTION_
IS_ NOT_ SET_ ERROR_ IDX - OPTION_
NOT_ FOUND_ ERROR_ IDX - OPTION_
TYPE_ UNDEFINED_ ERROR_ IDX - SHORT_
OPTION_ ALREADY_ EXISTS_ ERROR_ IDX