source
impl u32
1.43.0 · source
pub const MIN: Self = 0u32

1.43.0 · source
pub const MAX: Self = 4_294_967_295u32

1.53.0 · source
pub const BITS: u32 = 32u32

1.0.0 (const: 1.32.0) · source
pub const fn count_ones(self) -> u32

1.0.0 (const: 1.32.0) · source
pub const fn count_zeros(self) -> u32

1.0.0 (const: 1.32.0) · source
pub const fn leading_zeros(self) -> u32

1.0.0 (const: 1.32.0) · source
pub const fn trailing_zeros(self) -> u32

1.46.0 (const: 1.46.0) · source
pub const fn leading_ones(self) -> u32

1.46.0 (const: 1.46.0) · source
pub const fn trailing_ones(self) -> u32

source
pub const fn cast_signed(self) -> i32
🔬This is a nightly-only experimental API. (integer_sign_cast #125882)

1.0.0 (const: 1.32.0) · source
pub const fn rotate_left(self, n: u32) -> Self

1.0.0 (const: 1.32.0) · source
pub const fn rotate_right(self, n: u32) -> Self

1.0.0 (const: 1.32.0) · source
pub const fn swap_bytes(self) -> Self

1.37.0 (const: 1.37.0) · source
pub const fn reverse_bits(self) -> Self

1.0.0 (const: 1.32.0) · source
pub const fn from_be(x: Self) -> Self

1.0.0 (const: 1.32.0) · source
pub const fn from_le(x: Self) -> Self

1.0.0 (const: 1.32.0) · source
pub const fn to_be(self) -> Self

1.0.0 (const: 1.32.0) · source
pub const fn to_le(self) -> Self

1.0.0 (const: 1.47.0) · source
pub const fn checked_add(self, rhs: Self) -> Option<Self>

source
pub const fn strict_add(self, rhs: Self) -> Self
🔬This is a nightly-only experimental API. (strict_overflow_ops #118260)

1.79.0 (const: 1.79.0) · source
pub const unsafe fn unchecked_add(self, rhs: Self) -> Self

1.66.0 (const: 1.66.0) · source
pub const fn checked_add_signed(self, rhs: i32) -> Option<Self>

source
pub const fn strict_add_signed(self, rhs: i32) -> Self
🔬This is a nightly-only experimental API. (strict_overflow_ops #118260)

1.0.0 (const: 1.47.0) · source
pub const fn checked_sub(self, rhs: Self) -> Option<Self>

source
pub const fn strict_sub(self, rhs: Self) -> Self
🔬This is a nightly-only experimental API. (strict_overflow_ops #118260)

1.79.0 (const: 1.79.0) · source
pub const unsafe fn unchecked_sub(self, rhs: Self) -> Self

source
pub const fn checked_signed_diff(self, rhs: Self) -> Option<i32>
🔬This is a nightly-only experimental API. (unsigned_signed_diff #126041)

1.0.0 (const: 1.47.0) · source
pub const fn checked_mul(self, rhs: Self) -> Option<Self>

source
pub const fn strict_mul(self, rhs: Self) -> Self
🔬This is a nightly-only experimental API. (strict_overflow_ops #118260)

1.79.0 (const: 1.79.0) · source
pub const unsafe fn unchecked_mul(self, rhs: Self) -> Self

1.0.0 (const: 1.52.0) · source
pub const fn checked_div(self, rhs: Self) -> Option<Self>

source
pub const fn strict_div(self, rhs: Self) -> Self
🔬This is a nightly-only experimental API. (strict_overflow_ops #118260)

1.38.0 (const: 1.52.0) · source
pub const fn checked_div_euclid(self, rhs: Self) -> Option<Self>

source
pub const fn strict_div_euclid(self, rhs: Self) -> Self
🔬This is a nightly-only experimental API. (strict_overflow_ops #118260)

1.7.0 (const: 1.52.0) · source
pub const fn checked_rem(self, rhs: Self) -> Option<Self>

source
pub const fn strict_rem(self, rhs: Self) -> Self
🔬This is a nightly-only experimental API. (strict_overflow_ops #118260)

1.38.0 (const: 1.52.0) · source
pub const fn checked_rem_euclid(self, rhs: Self) -> Option<Self>

source
pub const fn strict_rem_euclid(self, rhs: Self) -> Self
🔬This is a nightly-only experimental API. (strict_overflow_ops #118260)

1.67.0 (const: 1.67.0) · source
pub const fn ilog(self, base: Self) -> u32

1.67.0 (const: 1.67.0) · source
pub const fn ilog2(self) -> u32

1.67.0 (const: 1.67.0) · source
pub const fn ilog10(self) -> u32

1.67.0 (const: 1.67.0) · source
pub const fn checked_ilog(self, base: Self) -> Option<u32>

1.67.0 (const: 1.67.0) · source
pub const fn checked_ilog2(self) -> Option<u32>

1.67.0 (const: 1.67.0) · source
pub const fn checked_ilog10(self) -> Option<u32>

1.7.0 (const: 1.47.0) · source
pub const fn checked_neg(self) -> Option<Self>

source
pub const fn strict_neg(self) -> Self
🔬This is a nightly-only experimental API. (strict_overflow_ops #118260)

1.7.0 (const: 1.47.0) · source
pub const fn checked_shl(self, rhs: u32) -> Option<Self>

source
pub const fn strict_shl(self, rhs: u32) -> Self
🔬This is a nightly-only experimental API. (strict_overflow_ops #118260)

source
pub const unsafe fn unchecked_shl(self, rhs: u32) -> Self
🔬This is a nightly-only experimental API. (unchecked_shifts #85122)

source
pub const fn unbounded_shl(self, rhs: u32) -> u32
🔬This is a nightly-only experimental API. (unbounded_shifts #129375)

1.7.0 (const: 1.47.0) · source
pub const fn checked_shr(self, rhs: u32) -> Option<Self>

source
pub const fn strict_shr(self, rhs: u32) -> Self
🔬This is a nightly-only experimental API. (strict_overflow_ops #118260)

source
pub const unsafe fn unchecked_shr(self, rhs: u32) -> Self
🔬This is a nightly-only experimental API. (unchecked_shifts #85122)

source
pub const fn unbounded_shr(self, rhs: u32) -> u32
🔬This is a nightly-only experimental API. (unbounded_shifts #129375)

1.34.0 (const: 1.50.0) · source
pub const fn checked_pow(self, exp: u32) -> Option<Self>

source
pub const fn strict_pow(self, exp: u32) -> Self
🔬This is a nightly-only experimental API. (strict_overflow_ops #118260)

1.0.0 (const: 1.47.0) · source
pub const fn saturating_add(self, rhs: Self) -> Self

1.66.0 (const: 1.66.0) · source
pub const fn saturating_add_signed(self, rhs: i32) -> Self

1.0.0 (const: 1.47.0) · source
pub const fn saturating_sub(self, rhs: Self) -> Self

1.7.0 (const: 1.47.0) · source
pub const fn saturating_mul(self, rhs: Self) -> Self

1.58.0 (const: 1.58.0) · source
pub const fn saturating_div(self, rhs: Self) -> Self

1.34.0 (const: 1.50.0) · source
pub const fn saturating_pow(self, exp: u32) -> Self

1.0.0 (const: 1.32.0) · source
pub const fn wrapping_add(self, rhs: Self) -> Self

1.66.0 (const: 1.66.0) · source
pub const fn wrapping_add_signed(self, rhs: i32) -> Self

1.0.0 (const: 1.32.0) · source
pub const fn wrapping_sub(self, rhs: Self) -> Self

1.0.0 (const: 1.32.0) · source
pub const fn wrapping_mul(self, rhs: Self) -> Self

1.2.0 (const: 1.52.0) · source
pub const fn wrapping_div(self, rhs: Self) -> Self

1.38.0 (const: 1.52.0) · source
pub const fn wrapping_div_euclid(self, rhs: Self) -> Self

1.2.0 (const: 1.52.0) · source
pub const fn wrapping_rem(self, rhs: Self) -> Self

1.38.0 (const: 1.52.0) · source
pub const fn wrapping_rem_euclid(self, rhs: Self) -> Self

1.2.0 (const: 1.32.0) · source
pub const fn wrapping_neg(self) -> Self

1.2.0 (const: 1.32.0) · source
pub const fn wrapping_shl(self, rhs: u32) -> Self

1.2.0 (const: 1.32.0) · source
pub const fn wrapping_shr(self, rhs: u32) -> Self

1.34.0 (const: 1.50.0) · source
pub const fn wrapping_pow(self, exp: u32) -> Self

1.7.0 (const: 1.32.0) · source
pub const fn overflowing_add(self, rhs: Self) -> (Self, bool)

source
pub const fn carrying_add(self, rhs: Self, carry: bool) -> (Self, bool)
🔬This is a nightly-only experimental API. (bigint_helper_methods #85532)

1.66.0 (const: 1.66.0) · source
pub const fn overflowing_add_signed(self, rhs: i32) -> (Self, bool)

1.7.0 (const: 1.32.0) · source
pub const fn overflowing_sub(self, rhs: Self) -> (Self, bool)

source
pub const fn borrowing_sub(self, rhs: Self, borrow: bool) -> (Self, bool)
🔬This is a nightly-only experimental API. (bigint_helper_methods #85532)

1.60.0 (const: 1.60.0) · source
pub const fn abs_diff(self, other: Self) -> Self

1.7.0 (const: 1.32.0) · source
pub const fn overflowing_mul(self, rhs: Self) -> (Self, bool)

1.7.0 (const: 1.52.0) · source
pub const fn overflowing_div(self, rhs: Self) -> (Self, bool)

1.38.0 (const: 1.52.0) · source
pub const fn overflowing_div_euclid(self, rhs: Self) -> (Self, bool)

1.7.0 (const: 1.52.0) · source
pub const fn overflowing_rem(self, rhs: Self) -> (Self, bool)

1.38.0 (const: 1.52.0) · source
pub const fn overflowing_rem_euclid(self, rhs: Self) -> (Self, bool)

1.7.0 (const: 1.32.0) · source
pub const fn overflowing_neg(self) -> (Self, bool)

1.7.0 (const: 1.32.0) · source
pub const fn overflowing_shl(self, rhs: u32) -> (Self, bool)

1.7.0 (const: 1.32.0) · source
pub const fn overflowing_shr(self, rhs: u32) -> (Self, bool)

1.34.0 (const: 1.50.0) · source
pub const fn overflowing_pow(self, exp: u32) -> (Self, bool)

1.0.0 (const: 1.50.0) · source
pub const fn pow(self, exp: u32) -> Self

source
pub const fn isqrt(self) -> Self
🔬This is a nightly-only experimental API. (isqrt #116226)

1.38.0 (const: 1.52.0) · source
pub const fn div_euclid(self, rhs: Self) -> Self

1.38.0 (const: 1.52.0) · source
pub const fn rem_euclid(self, rhs: Self) -> Self

source
pub const fn div_floor(self, rhs: Self) -> Self
🔬This is a nightly-only experimental API. (int_roundings #88581)

1.73.0 (const: 1.73.0) · source
pub const fn div_ceil(self, rhs: Self) -> Self

1.73.0 (const: 1.73.0) · source
pub const fn next_multiple_of(self, rhs: Self) -> Self

1.73.0 (const: 1.73.0) · source
pub const fn checked_next_multiple_of(self, rhs: Self) -> Option<Self>

source
pub const fn is_multiple_of(self, rhs: Self) -> bool
🔬This is a nightly-only experimental API. (unsigned_is_multiple_of #128101)

1.0.0 (const: 1.32.0) · source
pub const fn is_power_of_two(self) -> bool

1.0.0 (const: 1.50.0) · source
pub const fn next_power_of_two(self) -> Self

1.0.0 (const: 1.50.0) · source
pub const fn checked_next_power_of_two(self) -> Option<Self>

source
pub const fn wrapping_next_power_of_two(self) -> Self
🔬This is a nightly-only experimental API. (wrapping_next_power_of_two #32463)

1.32.0 (const: 1.44.0) · source
pub const fn to_be_bytes(self) -> [u8; 4]

1.32.0 (const: 1.44.0) · source
pub const fn to_le_bytes(self) -> [u8; 4]

1.32.0 (const: 1.44.0) · source
pub const fn to_ne_bytes(self) -> [u8; 4]

1.32.0 (const: 1.44.0) · source
pub const fn from_be_bytes(bytes: [u8; 4]) -> Self

1.32.0 (const: 1.44.0) · source
pub const fn from_le_bytes(bytes: [u8; 4]) -> Self

1.32.0 (const: 1.44.0) · source
pub const fn from_ne_bytes(bytes: [u8; 4]) -> Self

1.0.0 (const: 1.32.0) · source
pub const fn min_value() -> Self
👎Deprecating in a future version: replaced by the MIN associated constant on this type

1.0.0 (const: 1.32.0) · source
pub const fn max_value() -> Self
👎Deprecating in a future version: replaced by the MAX associated constant on this type

source
pub const fn widening_mul(self, rhs: Self) -> (Self, Self)
🔬This is a nightly-only experimental API. (bigint_helper_methods #85532)

source
pub const fn carrying_mul(self, rhs: Self, carry: Self) -> (Self, Self)
🔬This is a nightly-only experimental API. (bigint_helper_methods #85532)

source
pub const fn midpoint(self, rhs: u32) -> u32
🔬This is a nightly-only experimental API. (num_midpoint #110840)

source
impl u32
1.0.0 (const: 1.82.0) · source
pub const fn from_str_radix(src: &str, radix: u32) -> Result<u32, ParseIntError>
