Trait bloom2::Bitmap

source ·
pub trait Bitmap {
    // Required methods
    fn set(&mut self, key: usize, value: bool);
    fn get(&self, key: usize) -> bool;
    fn byte_size(&self) -> usize;
}
Expand description

A trait to abstract bit storage for use in a Bloom2 filter.

Required Methods§

source

fn set(&mut self, key: usize, value: bool)

Set bit indexed by key to value.

source

fn get(&self, key: usize) -> bool

Return true if the given bit index was previously set to true.

source

fn byte_size(&self) -> usize

Return the size of the bitmap in bytes.

Implementors§