Skip to main content

Module num

Module num 

1.6.0 ยท Source
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.