Trait bitfield::Bit

source ·
pub trait Bit {
    // Required methods
    fn bit(&self, bit: usize) -> bool;
    fn set_bit(&mut self, bit: usize, value: bool);
}
Expand description

A trait to get or set a single bit.

This trait is implemented for all type that implement BitRange<u8>.

Required Methods§

source

fn bit(&self, bit: usize) -> bool

Get a single bit.

source

fn set_bit(&mut self, bit: usize, value: bool)

Set a single bit.

Implementors§

source§

impl<T: BitRange<u8>> Bit for T