Module cast

Source

Macrosยง

float_to_int_unchecked ๐Ÿ”’
impl_as_primitive ๐Ÿ”’
impl_from_primitive ๐Ÿ”’
impl_from_primitive_wrapping ๐Ÿ”’
impl_num_cast ๐Ÿ”’
impl_to_primitive_float ๐Ÿ”’
impl_to_primitive_float_to_float ๐Ÿ”’
impl_to_primitive_float_to_signed_int ๐Ÿ”’
impl_to_primitive_float_to_unsigned_int ๐Ÿ”’
impl_to_primitive_int ๐Ÿ”’
impl_to_primitive_int_to_int ๐Ÿ”’
impl_to_primitive_int_to_uint ๐Ÿ”’
impl_to_primitive_uint ๐Ÿ”’
impl_to_primitive_uint_to_int ๐Ÿ”’
impl_to_primitive_uint_to_uint ๐Ÿ”’
impl_to_primitive_wrapping ๐Ÿ”’

Traitsยง

AsPrimitive
A generic interface for casting between machine scalars with the as operator, which admits narrowing and precision loss. Implementers of this trait AsPrimitive should behave like a primitive numeric type (e.g. a newtype around another primitive), and the intended conversion must never fail.
FromPrimitive
A generic trait for converting a number to a value.
NumCast
An interface for casting between machine scalars.
ToPrimitive
A generic trait for converting a value to a number.

Functionsยง

cast
Cast from one machine scalar to another.