With the new `ArgMatches`, we need to know what the inner type is.
Unfortunately, #3142 didn't list use cases for this. We dropped the
`Option` alias changing `T` but we still have a `Result` in there that
is aliased.
One potential workaround if people need it is if we add an attribute to
specify the `get_many::<T>` type. This would also help with
`ArgAction::Count` to support more data types.
Putting it on the doc comment is weird. We are now putting it on the
field which is a slight improvement. This better conveys "this is
auto-generated".
No test was added because the use case that I know of for exposing this
is short lived.
- This matches the more container-like naming we are aiming for
- This provides an opportunity to warn people about moving away from
`ArgAction::IncOcccurrences` for flags, like the deprecation for
`ArgMatches::occurrences_of` to help people migrate in preparation for
clap 4 (rather than having the behavior change subtly in a way only
caught by thorough tests)
In addition, I feel `contains_id` has less ambiguous meaning than
`is_present`.
Someone should not reasonably expect a coun flag to go up to billions,
millions, or even thousands. 255 should be sufficient for anyone,
right?
The original type was selected to be consistent with
`ArgMatches::occurrences_of` but that is also used for tracking how
many values appear which can be large with `xargs`.
I'm still conflicted on what the "right type" is an wish we could
support any numeric type. When I did a search on github though, every
case was for debug/quiet flags and only supported 2-3 occurrences,
making a `u8` overkill.
This came out of a discussion on #3792
With `AnyValueParser` now private, we can also make `AnyValue` private.
Most users should not need to call `ValueParser::parse_ref` and doing
this gives us more implementation freedom for the future.