docs(derive): Add help text

This commit is contained in:
mattmadeofpasta 2022-10-04 12:32:49 +00:00
parent 39fe46e650
commit b1c05bcecb
No known key found for this signature in database
GPG key ID: 020D6BD1B8975037
2 changed files with 25 additions and 1 deletions

View file

@ -4,11 +4,31 @@ A simple to use, efficient, and full-featured Command Line Argument Parser
Usage: 04_01_enum_derive[EXE] <MODE>
Arguments:
<MODE>
What mode to run the program in
Possible values:
- fast: Run swiftly
- slow: Crawl slowly but steadily
Options:
-h, --help
Print help information (use `-h` for a summary)
-V, --version
Print version information
$ 04_01_enum_derive -h
A simple to use, efficient, and full-featured Command Line Argument Parser
Usage: 04_01_enum_derive[EXE] <MODE>
Arguments:
<MODE> What mode to run the program in [possible values: fast, slow]
Options:
-h, --help Print help information
-h, --help Print help information (use `--help` for more detail)
-V, --version Print version information
$ 04_01_enum_derive fast

View file

@ -10,7 +10,11 @@ struct Cli {
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, ValueEnum)]
enum Mode {
/// Run swiftly
Fast,
/// Crawl slowly but steadily
///
/// This paragraph is ignored because there is no long help text for possible values.
Slow,
}