pub struct BloomFilter { /* private fields */ }Expand description
A thread-safe Bloom Filter implementation
Implementations§
Source§impl BloomFilter
impl BloomFilter
Sourcepub fn new(size: usize, hash_functions: usize) -> Self
pub fn new(size: usize, hash_functions: usize) -> Self
Creates a new Bloom Filter with the specified size and number of hash functions
Sourcepub fn might_contain<T: Hash>(&self, item: &T) -> bool
pub fn might_contain<T: Hash>(&self, item: &T) -> bool
Checks if an item might be in the Bloom Filter Returns true if the item might be in the set, false if it definitely isn’t
Auto Trait Implementations§
impl !Freeze for BloomFilter
impl RefUnwindSafe for BloomFilter
impl Send for BloomFilter
impl Sync for BloomFilter
impl Unpin for BloomFilter
impl UnwindSafe for BloomFilter
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