pub struct Config {
pub elements: usize,
pub hashers_count: usize,
pub max_buf_bits_count: usize,
pub buf_increase_step: usize,
pub preferred_false_positive_rate: f64,
}
Expand description
Bloom filter configuration parameters.
Fields§
§elements: usize
records count in one blob.
hashers_count: usize
number of hash functions, the more hash functions. you have, the slower bloom filter, and the quicker it fills up. If you have too few, however, you may suffer too many false positives.
max_buf_bits_count: usize
number of bits in the inner buffer.
buf_increase_step: usize
filter buf increase value. Not used anymore
preferred_false_positive_rate: f64
filter incrementally increases buffer size by step and checks result false positive rate to be less than param. It stops once buffer reaches size of max_buf_bits_count.
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq<Config> for Config
impl PartialEq<Config> for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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