Skip to main content

Crate num_conv

Crate num_conv 

Source
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. The crate is currently in the process of being uplifted into the standard library; see rust-lang/rust#154330 for details.

Modules§

prelude
Anonymously import all extension traits.

Traits§

ExtendDeprecated
Extend to an integer of the same size or larger, preserving its value.
ExtendTargetDeprecated
A type that can be used with turbofish syntax in Extend::extend.
Truncate
Truncate to an integer of the same size or smaller.
TruncateTarget
A type that can be used with turbofish syntax in Truncate::truncate.
Widen
Widen to an integer of the same size or larger, preserving its value.
WidenTarget
A type that can be used with turbofish syntax in Widen::widen.