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
doc.rust-lang.org
pub const fn checked_add_unsigned(self, rhs: u8) -> Option<Self>
Checked addition 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_add(self, rhs: Self) -> Option<Self>
Checked integer addition. 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_abs(self) -> Option<Self>
Checked absolute value. Computes self.abs(), returning None if self == MIN.
method
core
Stable since 1.13.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn cast_unsigned(self) -> u8
Returns the bit pattern of self reinterpreted as an unsigned integer of the same size.
method
core
Stable since 1.87.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn abs_diff(self, other: Self) -> u8
Computes the absolute difference between self and other.
method
core
Stable since 1.60.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn abs(self) -> Self
Computes the absolute value of self.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
const MIN: Self
The smallest value that can be represented by this integer type (−27).
associated_constant
core
Stable since 1.43.0
Version 1.100.0-nightly
doc.rust-lang.org
const MAX: Self
The largest value that can be represented by this integer type (27 − 1).
associated_constant
core
Stable since 1.43.0
Version 1.100.0-nightly
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 i8
The 8-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: u64) -> 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