Expand description
This crate provides traits [To{type}] and [As{type}] providing methods [to_{type}] and [as_{type}] for converting numbers between types
without using [as] casts. The rules for these names are as follows. Methods named
[as_{type}] will always convert the value losslessly producing an exact result, whereas
[to_{type]] are possibly lossy but will always convert to the nearest value of the result type during
integer-integer conversions, and for conversions involving floating-point values, the result is
the same as that of an [as] cast.
Whenever an [As] trait is implemented, the corresponding [To] trait is also implemented,
and has the same behavior.
Existence of AsUsize and AsIsize for a particular type is target architecture
dependent, so usage of these traits is discouraged.
[use num-to::*;] will include only the 14 [As] traits, 14 [To] traits and nothing
else.