Expand description
Numeric traits and functions for the built-in numeric types.
Re-exportsยง
use crate::convert::BoundedCastFromInt;๐Experimental use crate::convert::CheckedCastFromInt;๐Experimental use crate::panic::const_panic;๐Experimental use crate::str::FromStr;๐use crate::ub_checks::assert_unsafe_precondition;๐Experimental use crate::ascii;๐use crate::intrinsics;๐Experimental use crate::mem;๐pub use error::IntErrorKind;pub use error::ParseIntError;pub use error::TryFromIntError;pub use float_parse::ParseFloatError;pub use nonzero::NonZero;pub use nonzero::NonZeroI8;pub use nonzero::NonZeroI16;pub use nonzero::NonZeroI32;pub use nonzero::NonZeroI64;pub use nonzero::NonZeroI128;pub use nonzero::NonZeroIsize;pub use nonzero::NonZeroU8;pub use nonzero::NonZeroU16;pub use nonzero::NonZeroU32;pub use nonzero::NonZeroU64;pub use nonzero::NonZeroU128;pub use nonzero::NonZeroUsize;pub use saturating::Saturating;pub use wrapping::Wrapping;pub use bfloat::f16b;Experimental pub use complex::Complex;Experimental pub use float_parse::FloatErrorKind;Experimental pub use nonzero::ZeroablePrimitive;Experimental
Modulesยง
- complex ๐
- error ๐
- Error types for conversion to integral types.
- float_
macros ๐ - float_
parse ๐ - User-facing API for float parsing.
- int_
macros ๐ - nonzero ๐
- Definitions of integer that is known not to equal zero.
- saturating ๐
- Definitions of
Saturating<T>. - traits ๐
- uint_
macros ๐ - wrapping ๐
- Definitions of
Wrapping<T>. - bfloat ๐
Experimental - The 16-bit brain floating-point type.
- imp ๐ป
Experimental - Numeric routines, separate from API.
- niche_
types ๐ปExperimental - 100% perma-unstable
Macrosยง
- carrying_
carryless_ ๐mul_ impl - from_
str_ ๐int_ impl - i8_
xe_ ๐bytes_ doc - midpoint_
impl ๐ - sign_
dependent_ ๐expr - try_opt ๐
- u8_
xe_ ๐bytes_ doc - usize_
isize_ ๐from_ xe_ bytes_ doc - usize_
isize_ ๐to_ xe_ bytes_ doc - widening_
carryless_ ๐mul_ impl - widening_
mul_ ๐impl
Enumsยง
- FpCategory
- A classification of floating point numbers.
Constantsยง
- ASCII_
CASE_ ๐MASK - If the bit selected by this mask is set, ascii is lower case.
Functionsยง
- from_
ascii_ ๐bytes_ radix_ panic - can_
not_ ๐ปoverflow Experimental - 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.