[][src]Trait packing::Bit

pub trait Bit: IsLess<U8> + Unsigned {
    const HEAD_MASK: u8;
    const BIT_MASK: u8;
    const TAIL_MASK: u8;
}

Trait signifying a single bit in a byte. 7 = most significant bit, 0 = least significant bit

Associated Constants

const HEAD_MASK: u8

The mask used to discard bits before this bit (i.e. if this bit is 5, ANDing this mask with a u8 will ensure bits 7 and 6 are 0.

const BIT_MASK: u8

The mask used to extract the single bit from a byte

const TAIL_MASK: u8

The mask used to discard bits after this bit (i.e. if this bit is 5, ANDing this mask with a u8 will ensure bits 4 to 0 are 0

Loading content...

Implementors

impl Bit for U0[src]

impl Bit for U1[src]

impl Bit for U2[src]

impl Bit for U3[src]

impl Bit for U4[src]

impl Bit for U5[src]

impl Bit for U6[src]

impl Bit for U7[src]

Loading content...