doc.rust-lang.org
pub const fn from_be(x: Self) -> Self
Converts an integer from big endian to the target's endianness.
associated_function
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn format_into(self, buf: &mut NumBuffer<Self>) -> &str
Allows users to write an integer (in signed decimal format) into a variable buf of type NumBuffer that is passed by the caller by mutable reference.
method
core
Stable since 1.98.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn div_euclid(self, rhs: Self) -> Self
Calculates the quotient of Euclidean division of self by rhs.
method
core
Stable since 1.38.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn count_zeros(self) -> u32
Returns the number of zeros in the binary representation of self.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn count_ones(self) -> u32
Returns the number of ones in the binary representation of self.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn checked_sub_unsigned(self, rhs: u128) -> Option<Self>
Checked subtraction with an unsigned integer. Computes self - rhs, returning None if overflow occurred.
method
core
Stable since 1.66.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn checked_sub(self, rhs: Self) -> Option<Self>
Checked integer subtraction. Computes self - rhs, returning None if overflow occurred.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn checked_shr(self, rhs: u32) -> Option<Self>
Checked shift right. Computes self >> rhs, returning None if rhs is larger than or equal to the number of bits in self.
method
core
Stable since 1.7.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn checked_shl(self, rhs: u32) -> Option<Self>
Checked shift left. Computes self << rhs, returning None if rhs is larger than or equal to the number of bits in self.
method
core
Stable since 1.7.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn checked_rem_euclid(self, rhs: Self) -> Option<Self>
Checked Euclidean remainder. Computes self.rem_euclid(rhs), returning None if rhs == 0 or the division results in overflow.
method
core
Stable since 1.38.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn checked_rem(self, rhs: Self) -> Option<Self>
Checked integer remainder. Computes self % rhs, returning None if rhs == 0 or the division results in overflow.
method
core
Stable since 1.7.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn checked_pow(self, exp: u32) -> Option<Self>
Checked exponentiation. Computes self.pow(exp), returning None if overflow occurred.
method
core
Stable since 1.34.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn checked_neg(self) -> Option<Self>
Checked negation. Computes -self, returning None if self == MIN.
method
core
Stable since 1.7.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn checked_mul(self, rhs: Self) -> Option<Self>
Checked integer multiplication. Computes self * rhs, returning None if overflow occurred.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn checked_isqrt(self) -> Option<Self>
Returns the integer square root of the number, rounded down.
method
core
Stable since 1.84.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn checked_ilog2(self) -> Option<u32>
Returns the base 2 logarithm of the number, rounded down.
method
core
Stable since 1.67.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn checked_ilog10(self) -> Option<u32>
Returns the base 10 logarithm of the number, rounded down.
method
core
Stable since 1.67.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn checked_ilog(self, base: Self) -> Option<u32>
Returns the logarithm of the number with respect to an arbitrary base, rounded down.
method
core
Stable since 1.67.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn checked_div_euclid(self, rhs: Self) -> Option<Self>
Checked Euclidean division. Computes self.div_euclid(rhs), returning None if rhs == 0 or the division results in overflow.
method
core
Stable since 1.38.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn checked_div(self, rhs: Self) -> Option<Self>
Checked integer division. Computes self / rhs, returning None if rhs == 0 or the division results in overflow.
method
core
Stable since 1.0.0
Version 1.100.0-nightly