Open RoastVeg opened 1 year ago
Hi, thanks for reporting the issue.
I think, even if the lower/upper bound is not set explicitly in the validation, in that case MIN
or MAX
constant can be used of a particular inner type.
I guess, it must be technically possible to do, although it won't be my focus in my nearest future.
@RoastVeg Meanwhile, could you please share more details on your motivation and how would you like to use num::Bounded
?
Although
num
traits are usually implemented rather than derived, thenum-derive
crate shows that it is possible to write derive macros for them even for types more complex than newtype constructors.In fact, with the constraints this crate can offer on new types, it would be possible to even derive traits like
num::Bounded
.