Struct mmap_bitvec::BloomFilter
source · pub struct BloomFilter { /* private fields */ }Expand description
A simple implementation of a Bloom filter backed by BitVec
Implementations
sourceimpl BloomFilter
impl BloomFilter
sourcepub fn new<P>(
filename: Option<P>,
bits: usize,
n_hashes: u8
) -> Result<Self, Error>where
P: AsRef<Path>,
pub fn new<P>(
filename: Option<P>,
bits: usize,
n_hashes: u8
) -> Result<Self, Error>where
P: AsRef<Path>,
Creates a new BloomFilter (or opens an existing one, if the file
already exists) of a given size (in bits) and with a given number of
hash functions for each insert (n_hashes). If a filename is not
passed, the Bloom filter will be created in memory.
Auto Trait Implementations
impl RefUnwindSafe for BloomFilter
impl Send for BloomFilter
impl Sync for BloomFilter
impl Unpin for BloomFilter
impl UnwindSafe for BloomFilter
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more