Type Alias selectors::bloom::BloomFilter
source · pub type BloomFilter = CountingBloomFilter<BloomStorageU8>;
Expand description
A counting Bloom filter with 8-bit counters.
Aliased Type§
struct BloomFilter {
storage: BloomStorageU8,
}
Fields§
§storage: BloomStorageU8
Implementations§
source§impl<S> CountingBloomFilter<S>where
S: BloomStorage,
impl<S> CountingBloomFilter<S>where S: BloomStorage,
pub fn clear(&mut self)
pub fn is_zeroed(&self) -> bool
sourcepub fn insert_hash(&mut self, hash: u32)
pub fn insert_hash(&mut self, hash: u32)
Inserts an item with a particular hash into the bloom filter.
sourcepub fn remove_hash(&mut self, hash: u32)
pub fn remove_hash(&mut self, hash: u32)
Removes an item with a particular hash from the bloom filter.
sourcepub fn might_contain_hash(&self, hash: u32) -> bool
pub fn might_contain_hash(&self, hash: u32) -> bool
Check whether the filter might contain an item with the given hash. This can sometimes return true even if the item is not in the filter, but will never return false for items that are actually in the filter.
Trait Implementations§
source§impl<S> Clone for CountingBloomFilter<S>where
S: BloomStorage + Clone,
impl<S> Clone for CountingBloomFilter<S>where S: BloomStorage + Clone,
source§fn clone(&self) -> CountingBloomFilter<S>
fn clone(&self) -> CountingBloomFilter<S>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<S> Debug for CountingBloomFilter<S>where
S: BloomStorage,
impl<S> Debug for CountingBloomFilter<S>where S: BloomStorage,
source§impl<S> Default for CountingBloomFilter<S>where
S: BloomStorage + Default,
impl<S> Default for CountingBloomFilter<S>where S: BloomStorage + Default,
source§fn default() -> CountingBloomFilter<S>
fn default() -> CountingBloomFilter<S>
Returns the “default value” for a type. Read more