Trait bitwise::word::Word []

pub trait Word: Copy + Add<Self, Output=Self> + Sub<Self, Output=Self> + Mul<Self, Output=Self> + Div<Self, Output=Self> + Rem<Self, Output=Self> + Not<Output=Self> + BitAnd<Self, Output=Self> + BitOr<Self, Output=Self> + BitXor<Self, Output=Self> + Shl<Self, Output=Self> + Shr<Self, Output=Self> + PartialEq<Self> + PartialOrd<Self> {
    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