Expand description
Utilities for Rust numbers.
These traits define useful properties, methods, associated types, and trait bounds, and conversions for working with numbers in generic code.
Traits§
- AsCast
- An interface for casting between machine scalars, as if
aswas used. - AsPrimitive
- Type that can be converted to
primitivevalues withas. - Float
- The trait for floating-point
numbers. - Integer
- The base trait for all signed and unsigned
integers. - Number
- The base trait for all numbers (integers and floating-point numbers).
- Primitive
- The base trait for all
primitivetypes. - Signed
Integer - The trait for types that support
signedintegral operations, that is, they can hold negative numbers. - Unsigned
Integer - The trait for types that support
unsignedintegral operations, that is, they can only hold positive numbers.
Functions§
- as_cast
- Allows the high-level conversion of generic types as if
aswas used.