pub trait Bitmap {
// Required methods
fn new_with_capacity(max_key: usize) -> Self;
fn set(&mut self, key: usize, value: bool);
fn get(&self, key: usize) -> bool;
fn byte_size(&self) -> usize;
fn or(&self, other: &Self) -> Self;
}Expand description
A trait to abstract bit storage for use in a Bloom2
filter.
Required Methods§
Sourcefn new_with_capacity(max_key: usize) -> Self
fn new_with_capacity(max_key: usize) -> Self
Construct a new Bitmap impl with capacity to hold at least max_key
number of bits.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.