Trait 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<T>.

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 Bit for Bits<i8>

Source§

impl Bit for Bits<i16>

Source§

impl Bit for Bits<i32>

Source§

impl Bit for Bits<i64>

Source§

impl Bit for Bits<u8>

Source§

impl Bit for Bits<u16>

Source§

impl Bit for Bits<u32>

Source§

impl Bit for Bits<u64>