pub struct BloomSet { /* private fields */ }Expand description
A probabilistic set membership test using a bloom-filter style bit array.
Implementations§
Source§impl BloomSet
impl BloomSet
pub fn new(num_bits: usize, num_hashes: usize) -> Self
pub fn insert(&mut self, key: &str)
pub fn might_contain(&self, key: &str) -> bool
pub fn insert_count(&self) -> usize
pub fn num_bits(&self) -> usize
pub fn num_hashes(&self) -> usize
pub fn bits_set(&self) -> usize
pub fn fill_ratio(&self) -> f64
pub fn clear(&mut self)
pub fn is_empty(&self) -> bool
pub fn estimated_false_positive_rate(&self) -> f64
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BloomSet
impl RefUnwindSafe for BloomSet
impl Send for BloomSet
impl Sync for BloomSet
impl Unpin for BloomSet
impl UnsafeUnpin for BloomSet
impl UnwindSafe for BloomSet
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more