// queries an entry and detaches it from the LRU or creates a new one
queries an entry and detaches it from the LRU or creates a new one
queries an entry and detaches it from the LRU or creates a new one
fn query_or_insert_entry(
        &self,
        key: &K,
    ) -> std::result::Result<
        (&Bucket<K, V>, *const Entry<K, V>),
        (
            &Bucket<K, V>,
            *const Entry<K, V>,
            MutexGuard<HashSet<Pin<Box<entry::Entry<K, V>>>>>,
        ),
    > {
        let bucket = &self.buckets[key.bucket::<N>()];
        let mut map_lock = bucket.lock_map();
        if let Some(entry) = map_lock.get(key) {
            bucket.use_entry(entry);
            Ok((bucket, &**entry))
        } else {
            let entry = Box::pin(Entry::new(key.clone()));
            let entry_ptr: *const Entry<K, V> = &*entry;
            map_lock.insert(entry);
            Err((bucket, entry_ptr, map_lock))
        }
    }
fn query_or_insert_entry ( & self , key : & K , ) -> std :: result :: Result < ( & Bucket < K , V > , * const Entry < K , V > ) , ( & Bucket < K , V > , * const Entry < K , V > , MutexGuard < HashSet < Pin < Box < entry :: Entry < K , V > > > > > , ) , > { let bucket = & self . buckets [ key . bucket :: < N > ( ) ] ; let mut map_lock = bucket . lock_map ( ) ; if let Some ( entry ) = map_lock . get ( key ) { bucket . use_entry ( entry ) ; Ok ( ( bucket , & * * entry ) ) } else { let entry = Box :: pin ( Entry :: new ( key . clone ( ) ) ) ; let entry_ptr : * const Entry < K , V > = & * entry ; map_lock . insert ( entry ) ; Err ( ( bucket , entry_ptr , map_lock ) ) } }
queries an entry and detaches it from the LRU or creates a new one
queries an entry and detaches it from the LRU or creates a new one
&self
key
&K