pub struct Bloom { /* private fields */ }
Expand description

Bloom filter structure

Implementations

Create a new bloom filter structure. bitmap_size is the size in bytes (not bits) that will be allocated in memory items_count is an estimation of the maximum number of items to store.

Initializes bloom filter from saved state

Create a new bloom filter structure. items_count is an estimation of the maximum number of items to store. fp_p is the wanted rate of false positives, in ]0.0, 1.0[

Compute a recommended bitmap size for items_count items and a fp_p rate of false positives. fp_p obviously has to be within the ]0.0, 1.0[ range.

Records the presence of an item.

Check if an item is present in the set. There can be false positives, but no false negatives.

Return the number of bits in the filter

Return the number of hash functions used for check and set

Drains the bloom journal returning the updated bloom part

Returns the ratio of set bits in the bloom filter to the total bits

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.