doc.rust-lang.org
const BITS: u32
The size of this integer type in bits.
associated_constant
core
Stable since 1.53.0
Version 1.100.0-nightly
doc.rust-lang.org
primitive i32
The 32-bit signed integer type.
primitive
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn wrapping_sub_unsigned(self, rhs: u16) -> Self
Wrapping (modular) subtraction with an unsigned integer. Computes self - rhs, wrapping around at the boundary of the type.
method
core
Stable since 1.66.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn wrapping_sub(self, rhs: Self) -> Self
Wrapping (modular) subtraction. Computes self - rhs, wrapping around at the boundary of the type.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn wrapping_shr(self, rhs: u32) -> Self
Panic-free bitwise shift-right; yields self >> mask(rhs), where mask removes any high-order bits of rhs that would cause the shift to exceed the bitwidth of the type.
method
core
Stable since 1.2.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn wrapping_shl(self, rhs: u32) -> Self
Panic-free bitwise shift-left; yields self << mask(rhs), where mask removes any high-order bits of rhs that would cause the shift to exceed the bitwidth of the type.
method
core
Stable since 1.2.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn wrapping_rem_euclid(self, rhs: Self) -> Self
Wrapping Euclidean remainder. Computes self.rem_euclid(rhs), wrapping around at the boundary of the type.
method
core
Stable since 1.38.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn wrapping_rem(self, rhs: Self) -> Self
Wrapping (modular) remainder. Computes self % rhs, wrapping around at the boundary of the type.
method
core
Stable since 1.2.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn wrapping_pow(self, exp: u32) -> Self
Wrapping (modular) exponentiation. Computes self.pow(exp), wrapping around at the boundary of the type.
method
core
Stable since 1.34.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn wrapping_neg(self) -> Self
Wrapping (modular) negation. Computes -self, wrapping around at the boundary of the type.
method
core
Stable since 1.2.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn wrapping_mul(self, rhs: Self) -> Self
Wrapping (modular) multiplication. Computes self * rhs, wrapping around at the boundary of the type.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn wrapping_div_euclid(self, rhs: Self) -> Self
Wrapping Euclidean division. Computes self.div_euclid(rhs), wrapping around at the boundary of the type.
method
core
Stable since 1.38.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn wrapping_div(self, rhs: Self) -> Self
Wrapping (modular) division. Computes self / rhs, wrapping around at the boundary of the type.
method
core
Stable since 1.2.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn wrapping_add_unsigned(self, rhs: u16) -> Self
Wrapping (modular) addition with an unsigned integer. Computes self + rhs, wrapping around at the boundary of the type.
method
core
Stable since 1.66.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn wrapping_add(self, rhs: Self) -> Self
Wrapping (modular) addition. Computes self + rhs, wrapping around at the boundary of the type.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn wrapping_abs(self) -> Self
Wrapping (modular) absolute value. Computes self.abs(), wrapping around at the boundary of the type.
method
core
Stable since 1.13.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn unsigned_abs(self) -> u16
Computes the absolute value of self without any wrapping or panicking.
method
core
Stable since 1.51.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn unchecked_sub(self, rhs: Self) -> Self
Unchecked integer subtraction. 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_shr(self, rhs: u32) -> Self
Unchecked shift right. Computes self >> rhs, assuming that rhs is less than the number of bits in self.
method
core
Stable since 1.93.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn unchecked_shl(self, rhs: u32) -> Self
Unchecked shift left. Computes self << rhs, assuming that rhs is less than the number of bits in self.
method
core
Stable since 1.93.0
Version 1.100.0-nightly