Skip to content

Commit

Permalink
Merge pull request #5229 from epage/derive
Browse files Browse the repository at this point in the history
docs(derive): Link to tutorial sections for attributes
  • Loading branch information
epage authored Nov 27, 2023
2 parents 21b671f + a08587b commit b661a9d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/_derive/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@
//! [`Subcommand`][crate::Subcommand])
//! - When `Option<T>`, the subcommand becomes optional
//!
//! See [Configuring the Parser][_tutorial::chapter_1] and
//! [Subcommands][_tutorial::chapter_2#subcommands] from the tutorial.
//!
//! ### ArgGroup Attributes
//!
//! These correspond to the [`ArgGroup`][crate::ArgGroup] which is implicitly created for each
Expand All @@ -207,6 +210,8 @@
//! - For `struct`s, [`multiple = true`][crate::ArgGroup::multiple] is implied
//! - `enum` support is tracked at [#2621](https://github.com/clap-rs/clap/issues/2621)
//!
//! See [Argument Relations][_tutorial::chapter_3#argument-relations] from the tutorial.
//!
//! ### Arg Attributes
//!
//! These correspond to a [`Arg`][crate::Arg].
Expand Down Expand Up @@ -256,12 +261,17 @@
//! - Requires field arg to be of type `Vec<T>` and `T` to implement `std::convert::Into<OsString>` or `#[arg(value_enum)]`
//! - `<expr>` must implement `IntoIterator<T>`
//!
//! See [Adding Arguments][_tutorial::chapter_2] and [Validation][_tutorial::chapter_3] from the
//! tutorial.
//!
//! ### ValueEnum Attributes
//!
//! - `rename_all = <string_literal>`: Override default field / variant name case conversion for [`PossibleValue::new`][crate::builder::PossibleValue]
//! - When not present: `"kebab-case"`
//! - Available values: `"camelCase"`, `"kebab-case"`, `"PascalCase"`, `"SCREAMING_SNAKE_CASE"`, `"snake_case"`, `"lower"`, `"UPPER"`, `"verbatim"`
//!
//! See [Enumerated values][_tutorial::chapter_3#enumerated-values] from the tutorial.
//!
//! ### Possible Value Attributes
//!
//! These correspond to a [`PossibleValue`][crate::builder::PossibleValue].
Expand Down

0 comments on commit b661a9d

Please sign in to comment.