Module num
Numeric traits and functions for the built-in numeric types.
Modules
- complex
- error Error types for conversion to integral types.
- float_parse User-facing API for float parsing.
- imp Numeric routines, separate from API.
- int_macros
- niche_types 100% perma-unstable
- nonzero Definitions of integer that is known not to equal zero.
-
saturating
Definitions of
Saturating<T>. - traits
- uint_macros
-
wrapping
Definitions of
Wrapping<T>.
Structs
- Complex A complex number.
- NonZero A value that is known not to equal zero.
- ParseFloatError An error which can be returned when parsing a float.
- ParseIntError An error which can be returned when parsing an integer.
-
Saturating
Provides intentionally-saturating arithmetic on
T. - TryFromIntError The error type returned when a checked integral type conversion fails.
-
Wrapping
Provides intentionally-wrapped arithmetic on
T.
Enums
- FpCategory A classification of floating point numbers.
- IntErrorKind Enum to store the various types of errors that can cause parsing or converting an integer to fail.
Traits
- ZeroablePrimitive A marker trait for primitive types which can be zero.
Functions
- can_not_overflow Determines if a string of text of that length of that radix could be guaranteed to be stored in the given type T. Note that if the radix is known to the compiler, it is just the check of digits.len that is done at runtime.
- from_ascii_bytes_radix_panic
Type Aliases
-
NonZeroI128
An
i128that is known not to equal zero. -
NonZeroI16
An
i16that is known not to equal zero. -
NonZeroI32
An
i32that is known not to equal zero. -
NonZeroI64
An
i64that is known not to equal zero. -
NonZeroI8
An
i8that is known not to equal zero. -
NonZeroIsize
An
isizethat is known not to equal zero. -
NonZeroU128
A
u128that is known not to equal zero. -
NonZeroU16
A
u16that is known not to equal zero. -
NonZeroU32
A
u32that is known not to equal zero. -
NonZeroU64
A
u64that is known not to equal zero. -
NonZeroU8
A
u8that is known not to equal zero. -
NonZeroUsize
A
usizethat is known not to equal zero.
Constants
- ASCII_CASE_MASK If the bit selected by this mask is set, ascii is lower case.