Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undocumented Derive Attributes #3925

Closed
Iron-E opened this issue Jul 13, 2022 · 2 comments
Closed

Undocumented Derive Attributes #3925

Iron-E opened this issue Jul 13, 2022 · 2 comments

Comments

@Iron-E
Copy link

Iron-E commented Jul 13, 2022

On master, looking at the derive_ref, I have come across several options from other places in the documentation which do not appear to be documented in that file:

  1. group (example)
  2. requires (example)
  3. value_name (example)

I can only find mention of value_parser and required_if_eq on the derive_ref.

If this issue is invalid feel free to close.

@Iron-E Iron-E changed the title Undocumented Options Undocumented Derive Attributes Jul 13, 2022
@epage
Copy link
Member

epage commented Jul 13, 2022

These are documented by delegating to the builder documentation

Raw attributes: Any Arg method can also be used as an attribute, see Terminology for syntax.

e.g. #[clap(max_values(3))] would translate to arg.max_values(3)

See https://github.com/clap-rs/clap/blob/master/examples/derive_ref/README.md#arg-attributes

@epage epage closed this as completed Jul 13, 2022
@epage
Copy link
Member

epage commented Aug 18, 2022

I've created #4090 to further discuss the documentation of raw attributes as this keeps coming up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants