pub trait BitBlock: Copy + Add<Self, Output = Self> + Sub<Self, Output = Self> + Shl<usize, Output = Self> + Shr<usize, Output = Self> + Not<Output = Self> + BitAnd<Self, Output = Self> + BitOr<Self, Output = Self> + BitXor<Self, Output = Self> + Rem<Self, Output = Self> + Eq + Ord + Hash {
    fn bits() -> usize;
    fn from_byte(byte: u8) -> Self;
    fn count_ones(self) -> usize;
    fn zero() -> Self;
    fn one() -> Self;

    fn bytes() -> usize { ... }
}
Expand description

Abstracts over a pile of bits (basically unsigned primitives)

Required Methods

How many bits it has

Convert a byte into this type (lowest-order bits set)

Count the number of 1’s in the bitwise repr

Get 0

Get 1

Provided Methods

How many bytes it has

Implementations on Foreign Types

Implementors