Module num_traits::cast
source ยท Macrosยง
- impl_as_primitive ๐
- impl_from_primitive ๐
- impl_num_cast ๐
Traitsยง
- A generic interface for casting between machine scalars with the
as
operator, which admits narrowing and precision loss. Implementers of this traitAsPrimitive
should behave like a primitive numeric type (e.g. a newtype around another primitive), and the intended conversion must never fail. - A generic trait for converting a number to a value.
- An interface for casting between machine scalars.
- A generic trait for converting a value to a number.
Functionsยง
- Cast from one machine scalar to another.