pub fn contains<V>(&self, value: V) -> bool
    where
        V: Borrow<T>,
    {
        let n_slices = self.k + self.l;
        let mut i = self.l;
        let mut prev_count = 0;
        let mut count = 0;

        let hashes = self.hashers.hash(value);
        loop {
            let pos = self.p + i;
            let pos = pos.checked_sub(n_slices).unwrap_or(pos);

            let slice = self.get_slice(pos);
            let h = hashes.get(pos as u64) as usize;
            let hit = *slice.get(h).unwrap();
            if hit {
                count += 1;
                i += 1;
                if prev_count + count == self.k {
                    return true;
                }
            } else {
                if i < self.k {
                    return false;
                }
                i -= self.k;
                prev_count = count;
                count = 0;
            }
        }
    }
/// Returns `true` if the structure holds a given value.
Returns `true` if the structure holds a given value.
Returns ` true ` if the structure holds a given value .
pub fn contains<V>(&self, value: V) -> bool
    where
        V: Borrow<T>,
    {
        let n_slices = self.k + self.l;
        let mut i = self.l;
        let mut prev_count = 0;
        let mut count = 0;
        let hashes = self.hashers.hash(value);
        loop {
            let pos = self.p + i;
            let pos = pos.checked_sub(n_slices).unwrap_or(pos);
            let slice = self.get_slice(pos);
            let h = hashes.get(pos as u64) as usize;
            let hit = *slice.get(h).unwrap();
            if hit {
                count += 1;
                i += 1;
                if prev_count + count == self.k {
                    return true;
                }
            } else {
                if i < self.k {
                    return false;
                }
                i -= self.k;
                prev_count = count;
                count = 0;
            }
        }
    }
pub fn contains < V > ( & self , value : V ) -> bool where V : Borrow < T > , { let n_slices = self . k + self . l ; let mut i = self . l ; let mut prev_count = 0 ; let mut count = 0 ; let hashes = self . hashers . hash ( value ) ; loop { let pos = self . p + i ; let pos = pos . checked_sub ( n_slices ) . unwrap_or ( pos ) ; let slice = self . get_slice ( pos ) ; let h = hashes . get ( pos as u64 ) as usize ; let hit = * slice . get ( h ) . unwrap ( ) ; if hit { count += 1 ; i += 1 ; if prev_count + count == self . k { return true ; } } else { if i < self . k { return false ; } i -= self . k ; prev_count = count ; count = 0 ; } } }
Returns `true` if the structure holds a given value.
Returns ` true ` if the structure holds a given value .
&self
value
V