From a08587b00e347492165ded1415bad6ab339e9f0b Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 27 Nov 2023 16:16:54 -0600 Subject: [PATCH] docs(derive): Link to tutorial sections for attributes This is part of #5199 --- src/_derive/mod.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/_derive/mod.rs b/src/_derive/mod.rs index 0e9e18d98c6..2ad242d5923 100644 --- a/src/_derive/mod.rs +++ b/src/_derive/mod.rs @@ -189,6 +189,9 @@ //! [`Subcommand`][crate::Subcommand]) //! - When `Option`, 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 @@ -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]. @@ -256,12 +261,17 @@ //! - Requires field arg to be of type `Vec` and `T` to implement `std::convert::Into` or `#[arg(value_enum)]` //! - `` must implement `IntoIterator` //! +//! See [Adding Arguments][_tutorial::chapter_2] and [Validation][_tutorial::chapter_3] from the +//! tutorial. +//! //! ### ValueEnum Attributes //! //! - `rename_all = `: 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].