Skip to main content

AnyBitVec

Trait AnyBitVec 

Source
pub trait AnyBitVec {
    // Required methods
    fn len(&self) -> usize;
    fn get(&self, index: usize) -> Option<bool>;

    // Provided method
    fn is_empty(&self) -> bool { ... }
}
Expand description

A trait for uniform inspection of bit vectors.

Required Methods§

Source

fn len(&self) -> usize

Returns the number of bits in the bit vector.

Source

fn get(&self, index: usize) -> Option<bool>

Returns the bit value at the given index, or None if out of bounds.

Provided Methods§

Source

fn is_empty(&self) -> bool

Returns true if the bit vector contains no bits.

Implementations on Foreign Types§

Source§

impl<O: BitOrder> AnyBitVec for BitVec<u8, O>

Source§

fn len(&self) -> usize

Source§

fn get(&self, index: usize) -> Option<bool>

Implementors§

Source§

impl<const N: usize, O: BitOrder> AnyBitVec for HeaplessBitVec<N, O>

Source§

impl<const N: usize, O: BitOrder> AnyBitVec for SmallBitVec<N, O>