rokdocs
v0.1

rok::core::num::ints::impl i8

impl i8

  • pub const MIN: i8 = -127 - 1
  • pub const MAX: i8 = 127
  • pub const BITS: u32 = 8
  • pub const fn wrapping_add(self, rhs: i8) -> i8
  • pub const fn wrapping_sub(self, rhs: i8) -> i8
  • pub const fn wrapping_mul(self, rhs: i8) -> i8
  • pub const fn count_ones(self) -> u32
  • pub const fn count_zeros(self) -> u32
  • pub const fn leading_zeros(self) -> u32
  • pub const fn trailing_zeros(self) -> u32
  • pub const fn leading_ones(self) -> u32
  • pub const fn trailing_ones(self) -> u32
  • pub const fn rotate_left(self, n: u32) -> i8
  • pub const fn rotate_right(self, n: u32) -> i8
  • pub const fn swap_bytes(self) -> i8
  • pub const fn to_be(self) -> i8
  • pub const fn to_le(self) -> i8
  • pub const fn from_be(x: i8) -> i8
  • pub const fn from_le(x: i8) -> i8
  • pub const fn to_le_bytes(self) -> [u8; 1]
  • pub const fn to_be_bytes(self) -> [u8; 1]
  • pub const fn to_ne_bytes(self) -> [u8; 1]
  • pub const fn from_le_bytes(bytes: [u8; 1]) -> i8
  • pub const fn from_be_bytes(bytes: [u8; 1]) -> i8
  • pub const fn from_ne_bytes(bytes: [u8; 1]) -> i8
  • pub const fn checked_add(self, rhs: i8) -> i8 | none
  • pub const fn checked_sub(self, rhs: i8) -> i8 | none
  • pub const fn checked_mul(self, rhs: i8) -> i8 | none
  • pub const fn checked_div(self, rhs: i8) -> i8 | none
  • pub const fn checked_rem(self, rhs: i8) -> i8 | none
  • pub const fn checked_neg(self) -> i8 | none
  • pub const fn checked_shl(self, n: u32) -> i8 | none
  • pub const fn checked_shr(self, n: u32) -> i8 | none
  • pub const fn checked_pow(self, exp: u32) -> i8 | none
  • pub const fn wrapping_div(self, rhs: i8) -> i8
  • pub const fn wrapping_rem(self, rhs: i8) -> i8
  • pub const fn wrapping_neg(self) -> i8
  • pub const fn wrapping_shl(self, n: u32) -> i8
  • pub const fn wrapping_shr(self, n: u32) -> i8
  • pub const fn wrapping_pow(self, exp: u32) -> i8
  • pub const fn saturating_add(self, rhs: i8) -> i8
  • pub const fn saturating_sub(self, rhs: i8) -> i8
  • pub const fn saturating_mul(self, rhs: i8) -> i8
  • pub const fn saturating_neg(self) -> i8
  • pub const fn saturating_pow(self, exp: u32) -> i8
  • pub const fn overflowing_add(self, rhs: i8) -> (i8, bool)
  • pub const fn overflowing_sub(self, rhs: i8) -> (i8, bool)
  • pub const fn overflowing_mul(self, rhs: i8) -> (i8, bool)
  • pub const fn overflowing_div(self, rhs: i8) -> (i8, bool)
  • pub const fn overflowing_rem(self, rhs: i8) -> (i8, bool)
  • pub const fn overflowing_neg(self) -> (i8, bool)
  • pub const fn overflowing_shl(self, n: u32) -> (i8, bool)
  • pub const fn overflowing_shr(self, n: u32) -> (i8, bool)
  • pub const fn overflowing_pow(self, exp: u32) -> (i8, bool)
  • pub const fn pow(self, exp: u32) -> i8

    self to the exp; overflow is the arithmetic's (panic in debug, wrap in release).

  • pub const fn abs(self) -> i8
  • pub const fn checked_abs(self) -> i8 | none
  • pub const fn wrapping_abs(self) -> i8
  • pub const fn saturating_abs(self) -> i8
  • pub const fn unsigned_abs(self) -> u8
  • pub const fn abs_diff(self, rhs: i8) -> u8
  • pub const fn signum(self) -> i8

    -1, 0 or 1.

  • pub const fn is_positive(self) -> bool
  • pub const fn is_negative(self) -> bool
  • pub const fn div_euclid(self, rhs: i8) -> i8

    Quotient rounded so that rem_euclid is never negative.

  • pub const fn rem_euclid(self, rhs: i8) -> i8

    The remainder in 0..rhs.abs().

  • pub const fn isqrt(self) -> i8

    Integer square root; panics on a negative number.

  • pub const fn checked_isqrt(self) -> i8 | none
  • pub const fn ilog2(self) -> u32

    floor(log2(self)); panics unless self > 0.

  • pub const fn ilog10(self) -> u32
  • pub const fn ilog(self, base: i8) -> u32
  • pub const fn checked_ilog2(self) -> u32 | none
  • pub const fn checked_ilog10(self) -> u32 | none
  • pub const fn checked_ilog(self, base: i8) -> u32 | none