pub struct BloomFilter { /* private fields */ }Implementations§
Source§impl BloomFilter
impl BloomFilter
Sourcepub fn new_with_keys(keys: &[Key], fpr: f64) -> Self
pub fn new_with_keys(keys: &[Key], fpr: f64) -> Self
Sourcepub fn point_query(&self, key: Key) -> bool
pub fn point_query(&self, key: Key) -> bool
Sourcepub fn range_query(&self, start: Key, end: Key) -> bool
pub fn range_query(&self, start: Key, end: Key) -> bool
Perform a range query to check if any key might exist in the given range [start, end] (inclusive).
§Arguments
start- The start of the range (inclusive)end- The end of the range (inclusive)
§Returns
trueif at least one key in the range might exist (with false positive ratefpr)falseif no keys in the range exist
Auto Trait Implementations§
impl Freeze for BloomFilter
impl RefUnwindSafe for BloomFilter
impl Send for BloomFilter
impl Sync for BloomFilter
impl Unpin for BloomFilter
impl UnwindSafe for BloomFilter
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