pub enum FilterParams {
FalsePositiveRate(f64),
HashCount(u32),
}Expand description
Configuration parameter for creating a Bloom Filter.
Specify either the desired false positive rate (f64) or the specific number of hash functions (u32) to use.
Variants§
FalsePositiveRate(f64)
Target false positive rate (between 0.0 and 1.0). The filter will calculate optimal bits (m) and hashes (k).
HashCount(u32)
Target number of hash functions (k). The filter will calculate the optimal bits (m) to satisfy the 50% fill rate assumption for this k (p = 2^-k).
Trait Implementations§
Source§impl Clone for FilterParams
impl Clone for FilterParams
Source§fn clone(&self) -> FilterParams
fn clone(&self) -> FilterParams
Returns a duplicate 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 Debug for FilterParams
impl Debug for FilterParams
Source§impl From<f64> for FilterParams
impl From<f64> for FilterParams
Source§impl From<u32> for FilterParams
impl From<u32> for FilterParams
impl Copy for FilterParams
Auto Trait Implementations§
impl Freeze for FilterParams
impl RefUnwindSafe for FilterParams
impl Send for FilterParams
impl Sync for FilterParams
impl Unpin for FilterParams
impl UnwindSafe for FilterParams
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