Struct rsbloom::bloom::BloomFilter

source ·
pub struct BloomFilter { /* private fields */ }
Expand description

A Bloom filter implementation that tracks the total number of set bits along with the underlying bit vector and hashing functions, Murmur3 and xxHash.

Implementations

Return a new Bloom filter with a given number of approximate items to set. The default false positive probability is set and defined by DEFAULT_FALSE_POS.

Return a new Bloom filter with a given number of approximate items to set and a desired false positive probability.

Set an object in the Bloom filter. This operation is idempotent in regards to each unique object. Each object must implement the Hash trait.

Returns a bool reflecting if a given object is ‘most likely’ in the Bloom filter or not. There is a possibility for a false positive with the probability being under the Bloom filter’s p value, but a false negative will never occur.

Returns the approximate total number of objects set in the Bloom filter.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.