You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although num traits are usually implemented rather than derived, the num-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.
The text was updated successfully, but these errors were encountered:
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
.The text was updated successfully, but these errors were encountered: