pub fn find(&self, mask: u64, mask_bits: u32) -> impl Iterator<Item = usize> + '_ {
        let ones = (!0u64).checked_shr(mask_bits).unwrap_or(0);
        let mask = mask | ones;
        match self.shard_bits.cmp(&mask_bits) {
            Ordering::Less => {
                let pred = move |(&index, hash)| {
                    if hash | ones == mask {
                        Some(index)
                    } else {
                        None
                    }
                };
                Iter::Less(self.shard(mask).iter().filter_map(pred))
            }
            Ordering::Equal => Iter::Equal(self.shard(mask).keys().cloned()),
            Ordering::Greater => {
                let count = 1 << (self.shard_bits - mask_bits);
                let end = self.shard_index(mask) + 1;
                Iter::Greater(
                    self.shards[end - count..end]
                        .iter()
                        .flat_map(IndexMap::keys)
                        .cloned(),
                )
            }
        }
    }
/// Returns indices of all crds values which the first 'mask_bits' of their
/// hash value is equal to 'mask'.
Returns indices of all crds values which the first 'mask_bits' of their
hash value is equal to 'mask'.
Returns indices of all crds values which the first ' mask_bits ' of their hash value is equal to ' mask ' .
pub fn find(&self, mask: u64, mask_bits: u32) -> impl Iterator<Item = usize> + '_ {
        let ones = (!0u64).checked_shr(mask_bits).unwrap_or(0);
        let mask = mask | ones;
        match self.shard_bits.cmp(&mask_bits) {
            Ordering::Less => {
                let pred = move |(&index, hash)| {
                    if hash | ones == mask {
                        Some(index)
                    } else {
                        None
                    }
                };
                Iter::Less(self.shard(mask).iter().filter_map(pred))
            }
            Ordering::Equal => Iter::Equal(self.shard(mask).keys().cloned()),
            Ordering::Greater => {
                let count = 1 << (self.shard_bits - mask_bits);
                let end = self.shard_index(mask) + 1;
                Iter::Greater(
                    self.shards[end - count..end]
                        .iter()
                        .flat_map(IndexMap::keys)
                        .cloned(),
                )
            }
        }
    }
pub fn find ( & self , mask : u64 , mask_bits : u32 ) -> impl Iterator < Item = usize > + ' _ { let ones = ( ! 0u64 ) . checked_shr ( mask_bits ) . unwrap_or ( 0 ) ; let mask = mask | ones ; match self . shard_bits . cmp ( & mask_bits ) { Ordering :: Less => { let pred = move | ( & index , hash ) | { if hash | ones == mask { Some ( index ) } else { None } } ; Iter :: Less ( self . shard ( mask ) . iter ( ) . filter_map ( pred ) ) } Ordering :: Equal => Iter :: Equal ( self . shard ( mask ) . keys ( ) . cloned ( ) ) , Ordering :: Greater => { let count = 1 << ( self . shard_bits - mask_bits ) ; let end = self . shard_index ( mask ) + 1 ; Iter :: Greater ( self . shards [ end - count .. end ] . iter ( ) . flat_map ( IndexMap :: keys ) . cloned ( ) , ) } } }
Returns indices of all crds values which the first 'mask_bits' of their
hash value is equal to 'mask'.
Returns indices of all crds values which the first ' mask_bits ' of their hash value is equal to ' mask ' .
&self
mask
u64
mask_bits
u32