rok::core::num::ints::impl usize
impl usize
pub const MIN: usize = 0pub const MAX: usize = 18446744073709551615pub const BITS: u32 = 64pub const fn to_le_bytes(self) -> [u8; 8]pub const fn to_be_bytes(self) -> [u8; 8]pub const fn to_ne_bytes(self) -> [u8; 8]pub const fn from_le_bytes(bytes: [u8; 8]) -> usizepub const fn from_be_bytes(bytes: [u8; 8]) -> usizepub const fn from_ne_bytes(bytes: [u8; 8]) -> usizepub const MIN: usize = 0pub const MAX: usize = 4294967295pub const BITS: u32 = 32pub fn to_le_bytes(self) -> [u8; 4]pub fn to_be_bytes(self) -> [u8; 4]pub fn to_ne_bytes(self) -> [u8; 4]pub fn from_le_bytes(bytes: [u8; 4]) -> usizepub fn from_be_bytes(bytes: [u8; 4]) -> usizepub fn from_ne_bytes(bytes: [u8; 4]) -> usizepub const fn wrapping_add(self, rhs: usize) -> usizepub const fn wrapping_sub(self, rhs: usize) -> usizepub const fn wrapping_mul(self, rhs: usize) -> usizepub const fn count_ones(self) -> u32pub const fn count_zeros(self) -> u32pub const fn leading_zeros(self) -> u32pub const fn trailing_zeros(self) -> u32pub const fn leading_ones(self) -> u32pub const fn trailing_ones(self) -> u32pub const fn rotate_left(self, n: u32) -> usizepub const fn rotate_right(self, n: u32) -> usizepub const fn swap_bytes(self) -> usizepub const fn to_be(self) -> usizepub const fn to_le(self) -> usizepub const fn from_be(x: usize) -> usizepub const fn from_le(x: usize) -> usizepub const fn checked_add(self, rhs: usize) -> usize | nonepub const fn checked_sub(self, rhs: usize) -> usize | nonepub const fn checked_mul(self, rhs: usize) -> usize | nonepub const fn checked_div(self, rhs: usize) -> usize | nonepub const fn checked_rem(self, rhs: usize) -> usize | nonepub const fn checked_neg(self) -> usize | nonepub const fn checked_shl(self, n: u32) -> usize | nonepub const fn checked_shr(self, n: u32) -> usize | nonepub const fn checked_pow(self, exp: u32) -> usize | nonepub const fn wrapping_div(self, rhs: usize) -> usizepub const fn wrapping_rem(self, rhs: usize) -> usizepub const fn wrapping_neg(self) -> usizepub const fn wrapping_shl(self, n: u32) -> usizepub const fn wrapping_shr(self, n: u32) -> usizepub const fn wrapping_pow(self, exp: u32) -> usizepub const fn saturating_add(self, rhs: usize) -> usizepub const fn saturating_sub(self, rhs: usize) -> usizepub const fn saturating_mul(self, rhs: usize) -> usizepub const fn saturating_pow(self, exp: u32) -> usizepub const fn overflowing_add(self, rhs: usize) -> (usize, bool)pub const fn overflowing_sub(self, rhs: usize) -> (usize, bool)pub const fn overflowing_mul(self, rhs: usize) -> (usize, bool)pub const fn overflowing_div(self, rhs: usize) -> (usize, bool)pub const fn overflowing_rem(self, rhs: usize) -> (usize, bool)pub const fn overflowing_neg(self) -> (usize, bool)pub const fn overflowing_shl(self, n: u32) -> (usize, bool)pub const fn overflowing_shr(self, n: u32) -> (usize, bool)pub const fn overflowing_pow(self, exp: u32) -> (usize, bool)pub const fn pow(self, exp: u32) -> usizeselfto theexp; overflow is the arithmetic's (panic in debug, wrap in release).pub const fn abs_diff(self, rhs: usize) -> usizepub const fn div_euclid(self, rhs: usize) -> usizepub const fn rem_euclid(self, rhs: usize) -> usizepub const fn isqrt(self) -> usizeInteger square root (rounded down).
pub const fn is_power_of_two(self) -> boolpub const fn next_power_of_two(self) -> usizeThe smallest power of two
>= self; panics pastMAX.pub const fn checked_next_power_of_two(self) -> usize | nonepub const fn ilog2(self) -> u32floor(log2(self)); panics unlessself > 0.pub const fn ilog10(self) -> u32pub const fn ilog(self, base: usize) -> u32pub const fn checked_ilog2(self) -> u32 | nonepub const fn checked_ilog10(self) -> u32 | nonepub const fn checked_ilog(self, base: usize) -> u32 | none