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
as
was used. - AsPrimitive
- Type that can be converted to
primitive
values withas
. - Float
parse-floats
orwrite-floats
- 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
primitive
types. - Signed
Integer - The trait for types that support
signed
integral operations, that is, they can hold negative numbers. - Unsigned
Integer - The trait for types that support
unsigned
integral operations, that is, they can only hold positive numbers.
Functions§
- as_cast
- Allows the high-level conversion of generic types as if
as
was used.