Merge pull request #3908 from jturner314-nrl/derive-ref-quotes

docs(derive): Clarify `rename_all` takes a string literal
This commit is contained in:
Ed Page 2022-07-11 19:12:03 -05:00 committed by GitHub
commit 5c7ad01587
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -152,12 +152,12 @@ when defining subcommands.
- `next_display_order`: `clap::Command::next_display_order`
- `next_help_heading`: `clap::Command::next_help_heading`
- When `flatten`ing `Args`, this is scoped to just the args in this struct and any struct `flatten`ed into it
- `rename_all = <expr>`: Override default field / variant name case conversion for `Command::name` / `Arg::name`
- When not present: `kebab-case`
- Available values: `camelCase`, `kebab-case`, `PascalCase`, `SCREAMING_SNAKE_CASE`, `snake_case`, `lower`, `UPPER`, `verbatim`
- `rename_all_env = <expr>`: Override default field name case conversion for env variables for `clap::Arg::env`
- When not present: `SCREAMING_SNAKE_CASE`
- Available values: `camelCase`, `kebab-case`, `PascalCase`, `SCREAMING_SNAKE_CASE`, `snake_case`, `lower`, `UPPER`, `verbatim`
- `rename_all = <string_literal>`: Override default field / variant name case conversion for `Command::name` / `Arg::name`
- When not present: `"kebab-case"`
- Available values: `"camelCase"`, `"kebab-case"`, `"PascalCase"`, `"SCREAMING_SNAKE_CASE"`, `"snake_case"`, `"lower"`, `"UPPER"`, `"verbatim"`
- `rename_all_env = <string_literal>`: Override default field name case conversion for env variables for `clap::Arg::env`
- When not present: `"SCREAMING_SNAKE_CASE"`
- Available values: `"camelCase"`, `"kebab-case"`, `"PascalCase"`, `"SCREAMING_SNAKE_CASE"`, `"snake_case"`, `"lower"`, `"UPPER"`, `"verbatim"`
And for `Subcommand` variants:
- `skip`: Ignore this variant
@ -228,9 +228,9 @@ These correspond to a `clap::Arg`.
### Arg Enum Attributes
- `rename_all = <expr>`: Override default field / variant name case conversion for `PossibleValue::new`
- When not present: `kebab-case`
- Available values: `camelCase`, `kebab-case`, `PascalCase`, `SCREAMING_SNAKE_CASE`, `snake_case`, `lower`, `UPPER`, `verbatim`
- `rename_all = <string_literal>`: Override default field / variant name case conversion for `PossibleValue::new`
- When not present: `"kebab-case"`
- Available values: `"camelCase"`, `"kebab-case"`, `"PascalCase"`, `"SCREAMING_SNAKE_CASE"`, `"snake_case"`, `"lower"`, `"UPPER"`, `"verbatim"`
### Possible Value Attributes