Skip to content

Commit

Permalink
docs(derive): Clarify what defaulted action/value_parser does
Browse files Browse the repository at this point in the history
Noticed this was missing when responding to #4041
  • Loading branch information
epage committed Aug 8, 2022
1 parent f522b2c commit c7123b3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/_derive/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,17 @@
//! - `value_parser [= <expr>]`: [`Arg::value_parser`][crate::Arg::value_parser]
//! - When not present: will auto-select an implementation based on the field type using
//! [`value_parser!][crate::value_parser!]
//! - To register a custom type's [`ValueParser`][crate::builder::ValueParser], implement [`ValueParserFactory`][crate::builder::ValueParserFactory]
//! - When present but defaulted: opt-in to clap v4 semantics
//! - Env parsing is now dependent on inferred parser
//! - `PathBuf` will implicitly skip UTF-8 validation (before it required specifying
//! `try_from_os_str`)
//! - When present, implies `#[clap(action)]`
//! - To register a custom type's [`ValueParser`][crate::builder::ValueParser], implement [`ValueParserFactory`][crate::builder::ValueParserFactory]
//! - `action [= <expr>]`: [`Arg::action`][crate::Arg::action]
//! - When not present: will auto-select an action based on the field type
//! - When present but defaulted: opt-in to clap v4 semantics
//! - When present, implies `#[clap(value_parser)]`
//! - `args_override_self` is forced on for single flags
//! - `help = <expr>`: [`Arg::help`][crate::Arg::help]
//! - When not present: [Doc comment summary](#doc-comments)
//! - `long_help = <expr>`: [`Arg::long_help`][crate::Arg::long_help]
Expand Down

0 comments on commit c7123b3

Please sign in to comment.