Inferring more meaning from types for derives #2678
Labels
A-derive
Area: #[derive]` macro API
C-enhancement
Category: Raise on the bar on expectations
S-waiting-on-design
Status: Waiting on user-facing design to be resolved before implementing
Discussed in #2637
Originally posted by epage July 28, 2021
Right now, we only use types to infer occurrences / values (see #1772) or some limited capabilities when a user sets
arg_enum
.What else can we infer from types?
Path
, set ValueHint::AnyPathvalue_name
based on the type, likeNUM
for integers,PATH
forPath
, etcPath
,OsString
, etc.FromStr
,TryFrom<&OsStr>
, etc., in clap_derive #2298 wuld help with thisThe text was updated successfully, but these errors were encountered: