num crate has been deprecated and generic traits are the most frequently used parts, I developed a small crate
num-traits to fill this gap. It is an implementation of the
num-reform RFC, which only provides six primitive traits (
One) to cover most use cases for generic mathematics.
One are separated because they have been included in the
A big difference from the
num crate is the implementation of an interface for casting numbers. The
num crate introduces
NumCast traits, whereas we only use a
CastInto trait as an equivelence to
Into<Option<T>>. It will be unnecessary if these traits can be included in
The crate is experimental and it is not on
crates.io. Any comments are welcome!