Rust's integer types:
u64 and their signed counterpart, have a lot of similar methods and trait, such as
TryFrom<u64>, and I believe they are implemented by macros in source code.
However, I find it difficult to be generic over integer types. I know
num crate has
Integer trait, but it only provides a little functionalities. So if I want to use most of the integer's common methods, I should use macros by example to write my code instead of generic traits.
I really wonder why it is designed like this, since trait is obviously fit for this situation.