pub trait BitBlock: BitAnd<Output = Self> + BitOr<Output = Self> + BitXor<Output = Self> + Sized + Copy + Clone {
    type BitsIter: BitQueue;

    const SIZE_POT_EXPONENT: usize;

    // Required methods
    fn zero() -> Self;
    fn is_zero(&self) -> bool;
    fn set_bit<const BIT: bool>(&mut self, bit_index: usize) -> bool;
    fn get_bit(&self, bit_index: usize) -> bool;
    fn traverse_bits<F>(&self, f: F) -> ControlFlow<()>
       where F: FnMut(usize) -> ControlFlow<()>;
    fn bits_iter(self) -> Self::BitsIter;
    fn count_ones(&self) -> usize;
}

Required Associated Types§

Required Associated Constants§

Required Methods§

source

fn zero() -> Self

source

fn is_zero(&self) -> bool

source

fn set_bit<const BIT: bool>(&mut self, bit_index: usize) -> bool

Returns previous bit

source

fn get_bit(&self, bit_index: usize) -> bool

source

fn traverse_bits<F>(&self, f: F) -> ControlFlow<()>
where F: FnMut(usize) -> ControlFlow<()>,

source

fn bits_iter(self) -> Self::BitsIter

source

fn count_ones(&self) -> usize

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl BitBlock for u64

source§

const SIZE_POT_EXPONENT: usize = 6usize

source§

fn zero() -> Self

source§

fn is_zero(&self) -> bool

source§

fn set_bit<const BIT: bool>(&mut self, bit_index: usize) -> bool

source§

fn get_bit(&self, bit_index: usize) -> bool

source§

fn traverse_bits<F>(&self, f: F) -> ControlFlow<()>
where F: FnMut(usize) -> ControlFlow<()>,

§

type BitsIter = PrimitiveBitQueue<u64>

source§

fn bits_iter(self) -> Self::BitsIter

source§

fn count_ones(&self) -> usize

source§

impl BitBlock for u64x2

source§

const SIZE_POT_EXPONENT: usize = 7usize

source§

fn zero() -> Self

source§

fn is_zero(&self) -> bool

source§

fn set_bit<const BIT: bool>(&mut self, bit_index: usize) -> bool

source§

fn get_bit(&self, bit_index: usize) -> bool

source§

fn traverse_bits<F>(&self, f: F) -> ControlFlow<()>
where F: FnMut(usize) -> ControlFlow<()>,

§

type BitsIter = ArrayBitQueue<u64, 2>

source§

fn bits_iter(self) -> Self::BitsIter

source§

fn count_ones(&self) -> usize

source§

impl BitBlock for u64x4

source§

const SIZE_POT_EXPONENT: usize = 8usize

source§

fn zero() -> Self

source§

fn is_zero(&self) -> bool

source§

fn set_bit<const BIT: bool>(&mut self, bit_index: usize) -> bool

source§

fn get_bit(&self, bit_index: usize) -> bool

source§

fn traverse_bits<F>(&self, f: F) -> ControlFlow<()>
where F: FnMut(usize) -> ControlFlow<()>,

§

type BitsIter = ArrayBitQueue<u64, 4>

source§

fn bits_iter(self) -> Self::BitsIter

source§

fn count_ones(&self) -> usize

Implementors§