bit_field 0.6.0

Simple bit field trait providing get_bit, get_range, set_bit, and set_range methods for unsigned integers.

Trait bit_field::BitField [] [src]

pub trait BitField: Copy + Eq + Not<Output=Self> + Shl<u8, Output=Self> + Shr<u8, Output=Self> + BitAnd<Self, Output=Self> + BitOr<Self, Output=Self> + BitAndAssign + BitOrAssign {
    fn zero() -> Self;
    fn one() -> Self;
    fn length(&self) -> u8;

    fn get_bit(&self, bit: u8) -> bool { ... }
    fn get_range(&self, range: Range<u8>) -> Self { ... }
    fn set_bit(&mut self, bit: u8, value: bool) -> &mut Self { ... }
    fn set_range(&mut self, range: Range<u8>, value: Self) -> &mut Self { ... }
}

Required Methods

Provided Methods

Implementors