Module num

Module num 

Source
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 with as.
Floatparse-floats or write-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.
SignedInteger
The trait for types that support signed integral operations, that is, they can hold negative numbers.
UnsignedInteger
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.