pub fn insert<V>(&mut self, value: V)
    where
        V: Borrow<T>,
    {
        let n_slices = self.k + self.l;

        if self.n >= self.g {
            self.shift();
        }

        let hashes = self.hashers.hash(value);
        for i in 0..self.k {
            // Compute position of the i-th logical slice on the bits.
            let pos = self.p + i;
            let pos = pos.checked_sub(n_slices).unwrap_or(pos);

            let slice = self.get_slice_mut(pos);
            let h = hashes.get(pos as u64) as usize;
            slice.set(h, true);
        }

        self.n += 1;
    }
/// Inserts a value to the structure.
Inserts a value to the structure.
Inserts a value to the structure .
pub fn insert<V>(&mut self, value: V)
    where
        V: Borrow<T>,
    {
        let n_slices = self.k + self.l;
        if self.n >= self.g {
            self.shift();
        }
        let hashes = self.hashers.hash(value);
        for i in 0..self.k {
            // Compute position of the i-th logical slice on the bits.
            let pos = self.p + i;
            let pos = pos.checked_sub(n_slices).unwrap_or(pos);
            let slice = self.get_slice_mut(pos);
            let h = hashes.get(pos as u64) as usize;
            slice.set(h, true);
        }
        self.n += 1;
    }
pub fn insert < V > ( & mut self , value : V ) where V : Borrow < T > , { let n_slices = self . k + self . l ; if self . n >= self . g { self . shift ( ) ; } let hashes = self . hashers . hash ( value ) ; for i in 0 .. self . k { // Compute position of the i-th logical slice on the bits. let pos = self . p + i ; let pos = pos . checked_sub ( n_slices ) . unwrap_or ( pos ) ; let slice = self . get_slice_mut ( pos ) ; let h = hashes . get ( pos as u64 ) as usize ; slice . set ( h , true ) ; } self . n += 1 ; }
Inserts a value to the structure.
Inserts a value to the structure .
&mut self
value
V