doc.rust-lang.org
pub const fn strict_add_signed(self, rhs: i128) -> Self
Strict addition with a signed 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_add(self, rhs: Self) -> Self
Strict integer addition. 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 saturating_sub_signed(self, rhs: i128) -> Self
Saturating integer subtraction. Computes self - rhs, saturating at the numeric bounds instead of overflowing.
method
core
Stable since 1.90.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn saturating_sub(self, rhs: Self) -> Self
Saturating integer subtraction. Computes self - rhs, saturating at the numeric bounds instead of overflowing.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn saturating_pow(self, exp: u32) -> Self
Saturating integer exponentiation. Computes self.pow(exp), saturating at the numeric bounds instead of overflowing.
method
core
Stable since 1.34.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn saturating_mul(self, rhs: Self) -> Self
Saturating integer multiplication. Computes self * rhs, saturating at the numeric bounds instead of overflowing.
method
core
Stable since 1.7.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn saturating_div(self, rhs: Self) -> Self
Saturating integer division. Computes self / rhs, saturating at the numeric bounds instead of overflowing.
method
core
Stable since 1.58.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn saturating_add_signed(self, rhs: i128) -> Self
Saturating addition with a signed integer. Computes self + rhs, saturating at the numeric bounds instead of overflowing.
method
core
Stable since 1.66.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn saturating_add(self, rhs: Self) -> Self
Saturating integer addition. Computes self + rhs, saturating at the numeric bounds instead of overflowing.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn rotate_right(self, n: u32) -> Self
Shifts the bits to the right by a specified amount, n, wrapping the truncated bits to the beginning of the resulting integer.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn rotate_left(self, n: u32) -> Self
Shifts the bits to the left by a specified amount, n, wrapping the truncated bits to the end of the resulting integer.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn reverse_bits(self) -> Self
Reverses the order of bits in the integer. The least significant bit becomes the most significant bit, second least-significant bit becomes second most-significant bit, etc.
method
core
Stable since 1.37.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn rem_euclid(self, rhs: Self) -> Self
Calculates the least remainder of self when divided by rhs.
method
core
Stable since 1.38.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn pow(self, exp: u32) -> Self
Raises self to the power of exp, using exponentiation by squaring.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn overflowing_sub_signed(self, rhs: i128) -> (Self, bool)
Calculates self - rhs with a signed rhs
method
core
Stable since 1.90.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn overflowing_sub(self, rhs: Self) -> (Self, bool)
Calculates self - rhs.
method
core
Stable since 1.7.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn overflowing_shr(self, rhs: u32) -> (Self, bool)
Shifts self right by rhs bits.
method
core
Stable since 1.7.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn overflowing_shl(self, rhs: u32) -> (Self, bool)
Shifts self left by rhs bits.
method
core
Stable since 1.7.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn overflowing_rem_euclid(self, rhs: Self) -> (Self, bool)
Calculates the remainder self.rem_euclid(rhs) as if by Euclidean division.
method
core
Stable since 1.38.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn overflowing_rem(self, rhs: Self) -> (Self, bool)
Calculates the remainder when self is divided by rhs.
method
core
Stable since 1.7.0
Version 1.100.0-nightly