Trait poplar_util::bitmap::Bitmap

source ·
pub trait Bitmap: Sized {
    // Required methods
    fn alloc(&mut self, n: usize) -> Option<usize>;
    fn free(&mut self, index: usize, n: usize);
}

Required Methods§

source

fn alloc(&mut self, n: usize) -> Option<usize>

Find n consecutive unset bits, set them and return the index of the first bit.

source

fn free(&mut self, index: usize, n: usize)

Free n previously allocated bits, starting at index.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> Bitmap for T
where T: PrimInt + BitField + Debug,