Trait bitintr::Int [] [src]

pub trait Int: Sized + Copy + Add<Output = Self> + Sub<Output = Self> + Mul<Output = Self> + Div<Output = Self> + Rem<Output = Self> + Not<Output = Self> + BitAnd<Output = Self> + BitOr<Output = Self> + BitXor<Output = Self> + Shr<Self, Output = Self> + Shl<Self, Output = Self> + PartialEq + PartialOrd {
    type Unsigned: Int;
    type Signed: Int;
    fn one() -> Self;
    fn zero() -> Self;
    fn byte_size() -> Self;
    fn bit_size() -> Self;
    fn count_ones(self) -> Self;
    fn count_zeros(self) -> Self;
    fn leading_zeros(self) -> Self;
    fn trailing_zeros(self) -> Self;
    fn wrapping_neg(self) -> Self;
    fn wrapping_add(self, _: Self) -> Self;
    fn wrapping_sub(self, _: Self) -> Self;
    fn wrapping_shl(self, _: Self) -> Self;
    fn wrapping_shr(self, _: Self) -> Self;
    fn to_u8(self) -> u8;
    fn to_u16(self) -> u16;
    fn to_u32(self) -> u32;
    fn to_u64(self) -> u64;
    fn to_i8(self) -> i8;
    fn to_i16(self) -> i16;
    fn to_i32(self) -> i32;
    fn to_i64(self) -> i64;
    fn from_u8(_: u8) -> Self;
    fn from_u16(_: u16) -> Self;
    fn from_u32(_: u32) -> Self;
    fn from_u64(_: u64) -> Self;
    fn from_i8(_: i8) -> Self;
    fn from_i16(_: i16) -> Self;
    fn from_i32(_: i32) -> Self;
    fn from_i64(_: i64) -> Self;
    fn rotate_left(self, _: u32) -> Self;
    fn rotate_right(self, _: u32) -> Self;
    fn swap_bytes(self) -> Self;
    fn from_be(self) -> Self;
    fn from_le(self) -> Self;
    fn to_be(self) -> Self;
    fn to_le(self) -> Self;
    fn pow(self, exp: u32) -> Self;
    fn to_unsigned(self) -> Self::Unsigned;
    fn to_signed(self) -> Self::Signed;
    fn from_unsigned(_: Self::Unsigned) -> Self;
    fn from_signed(_: Self::Signed) -> Self;
}

Integer trait used to parametrize algorithms for all integer types.

Associated Types

Required Methods

Implementors