doc.rust-lang.org
pub const unsafe fn unchecked_neg(self) -> Self
Unchecked negation. Computes -self, assuming overflow cannot occur.
method
core
Stable since 1.93.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn unchecked_mul(self, rhs: Self) -> Self
Unchecked integer multiplication. Computes self * rhs, assuming overflow cannot occur.
method
core
Stable since 1.79.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn unchecked_add(self, rhs: Self) -> Self
Unchecked integer addition. Computes self + rhs, assuming overflow cannot occur.
method
core
Stable since 1.79.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn unbounded_shr(self, rhs: u32) -> i16
Unbounded shift right. Computes self >> rhs, without bounding the value of rhs.
method
core
Stable since 1.87.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn unbounded_shl(self, rhs: u32) -> i16
Unbounded shift left. Computes self << rhs, without bounding the value of rhs.
method
core
Stable since 1.87.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn trailing_zeros(self) -> u32
Returns the number of trailing 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 trailing_ones(self) -> u32
Returns the number of trailing ones in the binary representation of self.
method
core
Stable since 1.46.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn to_ne_bytes(self) -> [u8; 2]
Returns the memory representation of this integer as a byte array in native byte order.
method
core
Stable since 1.32.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn to_le_bytes(self) -> [u8; 2]
Returns the memory representation of this integer as a byte array in little-endian byte order.
method
core
Stable since 1.32.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn to_le(self) -> Self
Swaps bytes of self on big endian targets.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn to_be_bytes(self) -> [u8; 2]
Returns the memory representation of this integer as a byte array in big-endian (network) byte order.
method
core
Stable since 1.32.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn to_be(self) -> Self
Swaps bytes of self on little endian targets.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn swap_bytes(self) -> Self
Reverses the byte order of the integer.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn strict_sub_unsigned(self, rhs: u16) -> Self
Strict subtraction with an unsigned integer. Computes self - rhs, panicking if overflow occurred.
method
core
Stable since 1.91.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn strict_sub(self, rhs: Self) -> Self
Strict integer subtraction. Computes self - rhs, panicking if overflow occurred.
method
core
Stable since 1.91.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn strict_shr(self, rhs: u32) -> Self
Strict shift right. Computes self >> rhs, panicking if rhs is larger than or equal to the number of bits in self.
method
core
Stable since 1.91.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn strict_shl(self, rhs: u32) -> Self
Strict shift left. Computes self << rhs, panicking if rhs is larger than or equal to the number of bits in self.
method
core
Stable since 1.91.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn strict_rem_euclid(self, rhs: Self) -> Self
Strict Euclidean remainder. Computes self.rem_euclid(rhs), panicking if the division results in overflow.
method
core
Stable since 1.91.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn strict_rem(self, rhs: Self) -> Self
Strict integer remainder. Computes self % rhs, panicking if the division results in overflow.
method
core
Stable since 1.91.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn strict_pow(self, exp: u32) -> Self
Strict exponentiation. Computes self.pow(exp), panicking if overflow occurred.
method
core
Stable since 1.91.0
Version 1.100.0-nightly