Expand description
num_conv is a crate to convert between integer types without using as casts. This provides
better certainty when refactoring, makes the exact behavior of code more explicit, and allows
using turbofish syntax.
Modulesยง
Macrosยง
- impl_
cast_ ๐signed - impl_
cast_ ๐unsigned - impl_
extend ๐ - impl_
truncate ๐
Traitsยง
- Cast
Signed - Cast to a signed integer of the same size.
- Cast
Unsigned - Cast to an unsigned integer of the same size.
- Extend
- Extend to an integer of the same size or larger, preserving its value.
- Extend
Target - A type that can be used with turbofish syntax in
Extend::extend. - Truncate
- Truncate to an integer of the same size or smaller, preserving the least significant bits.
- Truncate
Target - A type that can be used with turbofish syntax in
Truncate::truncate.