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 traitAsPrimitive
should behave like a primitive numeric type (e.g. a newtype around another primitive), and the intended conversion must never fail. - From
Primitive - 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.