rok::core::num::ints::impl u16
impl u16
pub const MIN: u16 = 0pub const MAX: u16 = 65535pub const BITS: u32 = 16pub const fn wrapping_add(self, rhs: u16) -> u16pub const fn wrapping_sub(self, rhs: u16) -> u16pub const fn wrapping_mul(self, rhs: u16) -> u16pub 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) -> u16pub const fn rotate_right(self, n: u32) -> u16pub const fn swap_bytes(self) -> u16pub const fn to_be(self) -> u16pub const fn to_le(self) -> u16pub const fn from_be(x: u16) -> u16pub const fn from_le(x: u16) -> u16pub const fn to_le_bytes(self) -> [u8; 2]pub const fn to_be_bytes(self) -> [u8; 2]pub const fn to_ne_bytes(self) -> [u8; 2]pub const fn from_le_bytes(bytes: [u8; 2]) -> u16pub const fn from_be_bytes(bytes: [u8; 2]) -> u16pub const fn from_ne_bytes(bytes: [u8; 2]) -> u16pub const fn checked_add(self, rhs: u16) -> u16 | nonepub const fn checked_sub(self, rhs: u16) -> u16 | nonepub const fn checked_mul(self, rhs: u16) -> u16 | nonepub const fn checked_div(self, rhs: u16) -> u16 | nonepub const fn checked_rem(self, rhs: u16) -> u16 | nonepub const fn checked_neg(self) -> u16 | nonepub const fn checked_shl(self, n: u32) -> u16 | nonepub const fn checked_shr(self, n: u32) -> u16 | nonepub const fn checked_pow(self, exp: u32) -> u16 | nonepub const fn wrapping_div(self, rhs: u16) -> u16pub const fn wrapping_rem(self, rhs: u16) -> u16pub const fn wrapping_neg(self) -> u16pub const fn wrapping_shl(self, n: u32) -> u16pub const fn wrapping_shr(self, n: u32) -> u16pub const fn wrapping_pow(self, exp: u32) -> u16pub const fn saturating_add(self, rhs: u16) -> u16pub const fn saturating_sub(self, rhs: u16) -> u16pub const fn saturating_mul(self, rhs: u16) -> u16pub const fn saturating_pow(self, exp: u32) -> u16pub const fn overflowing_add(self, rhs: u16) -> (u16, bool)pub const fn overflowing_sub(self, rhs: u16) -> (u16, bool)pub const fn overflowing_mul(self, rhs: u16) -> (u16, bool)pub const fn overflowing_div(self, rhs: u16) -> (u16, bool)pub const fn overflowing_rem(self, rhs: u16) -> (u16, bool)pub const fn overflowing_neg(self) -> (u16, bool)pub const fn overflowing_shl(self, n: u32) -> (u16, bool)pub const fn overflowing_shr(self, n: u32) -> (u16, bool)pub const fn overflowing_pow(self, exp: u32) -> (u16, bool)pub const fn pow(self, exp: u32) -> u16selfto theexp; overflow is the arithmetic's (panic in debug, wrap in release).pub const fn abs_diff(self, rhs: u16) -> u16pub const fn div_euclid(self, rhs: u16) -> u16pub const fn rem_euclid(self, rhs: u16) -> u16pub const fn isqrt(self) -> u16Integer square root (rounded down).
pub const fn is_power_of_two(self) -> boolpub const fn next_power_of_two(self) -> u16The smallest power of two
>= self; panics pastMAX.pub const fn checked_next_power_of_two(self) -> u16 | nonepub const fn ilog2(self) -> u32floor(log2(self)); panics unlessself > 0.pub const fn ilog10(self) -> u32pub const fn ilog(self, base: u16) -> u32pub const fn checked_ilog2(self) -> u32 | nonepub const fn checked_ilog10(self) -> u32 | nonepub const fn checked_ilog(self, base: u16) -> u32 | none