pub fn insert<H: Hash + ?Sized>(&mut self, key: &H) -> bool {
        let mut present = true;

        let hasher = self.build_hasher(key);

        for hash in hasher.take(self.k) {
            let i = (hash as usize) % self.m;

            if !self.bits[i] {
                present = false;
                self.bits.set(i, true);
            }
        }

        if !present {
            self.n += 1;
        }

        !present
    }
/// Adds a value to the bloom filter.
///
/// Returns whether the value is already (maybe) in the filter or not. Duplicate values do not
/// affect the load factor.
///
/// # Examples
///
/// ```
/// use bbloom::BloomFilter;
///
/// let mut filter = BloomFilter::from_fpp(0.0001, 64);
/// assert!(filter.insert("a"));
/// assert!(filter.insert("b"));
/// assert!(!filter.insert("b"));
/// ```
Adds a value to the bloom filter.
Returns whether the value is already (maybe) in the filter or not. Duplicate values do not
affect the load factor.
Adds a value to the bloom filter . Returns whether the value is already ( maybe ) in the filter or not . Duplicate values do not affect the load factor .
pub fn insert<H: Hash + ?Sized>(&mut self, key: &H) -> bool {
        let mut present = true;
        let hasher = self.build_hasher(key);
        for hash in hasher.take(self.k) {
            let i = (hash as usize) % self.m;
            if !self.bits[i] {
                present = false;
                self.bits.set(i, true);
            }
        }
        if !present {
            self.n += 1;
        }
        !present
    }
pub fn insert < H : Hash + ? Sized > ( & mut self , key : & H ) -> bool { let mut present = true ; let hasher = self . build_hasher ( key ) ; for hash in hasher . take ( self . k ) { let i = ( hash as usize ) % self . m ; if ! self . bits [ i ] { present = false ; self . bits . set ( i , true ) ; } } if ! present { self . n += 1 ; } ! present }
Adds a value to the bloom filter.
Adds a value to the bloom filter .
&mut self
key
&H
&mut self
key
&H
examples
```
use bbloom::BloomFilter.


` ` ` use bbloom :: BloomFilter .