We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 13931a2 + 536e29f commit 233c316Copy full SHA for 233c316
clap_builder/src/builder/value_parser.rs
@@ -2387,6 +2387,18 @@ impl ValueParserFactory for i64 {
2387
RangedI64ValueParser::new()
2388
}
2389
2390
+impl<T> ValueParserFactory for std::num::Saturating<T>
2391
+where
2392
+ T: ValueParserFactory,
2393
+ <T as ValueParserFactory>::Parser: TypedValueParser<Value = T>,
2394
+ T: Send + Sync + Clone,
2395
+{
2396
+ type Parser =
2397
+ MapValueParser<<T as ValueParserFactory>::Parser, fn(T) -> std::num::Saturating<T>>;
2398
+ fn value_parser() -> Self::Parser {
2399
+ T::value_parser().map(std::num::Saturating)
2400
+ }
2401
+}
2402
impl<T> ValueParserFactory for std::num::Wrapping<T>
2403
where
2404
T: ValueParserFactory,
0 commit comments