pub struct BloomFilter { /* private fields */ }
Expand description
I have intentionally made the BloomFilter type opaque. It accepts any kind of input as long as it can be converted to bytes.
Implementations§
Source§impl BloomFilter
impl BloomFilter
pub fn new(capacity: usize, error_rate: f64, dup_check: bool) -> BloomFilter
pub fn new_with_default_error_rate( capacity: usize, dup_check: bool, ) -> BloomFilter
pub fn bitvec_len(&self) -> usize
pub fn capacity(&self) -> usize
pub fn len(&self) -> usize
pub fn error_rate(&self) -> f64
pub fn is_empty(&self) -> bool
pub fn add(&mut self, data: &[u8]) -> Result<bool, &'static str>
pub fn contains(&self, data: &[u8]) -> bool
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