fn search_for_item(&self, key: &str) -> Option<Arc<DecoderImpl::Output>> {
        {
            let guard = self.pinned_entries.read().unwrap();
            if let Some(x) = guard.get(key) {
                return Some((*x).clone());
            }
        }

        {
            let mut guard = self.decoded_cache.lock().unwrap();
            if let Some(x) = guard.get(key) {
                return Some(x);
            }
        }

        // The unlikely pessimistic case is that this item is in the weak references; let's try to get it out.
        self.weak_refs
            .read()
            .unwrap()
            .get(key)
            .and_then(|x| x.upgrade())
    }
/// Find an item in the cache, returning `None` if it isn't currently cached.
Find an item in the cache, returning `None` if it isn't currently cached.
Find an item in the cache returning ` None ` if it isn ' t currently cached .
fn search_for_item(&self, key: &str) -> Option<Arc<DecoderImpl::Output>> {
        {
            let guard = self.pinned_entries.read().unwrap();
            if let Some(x) = guard.get(key) {
                return Some((*x).clone());
            }
        }
        {
            let mut guard = self.decoded_cache.lock().unwrap();
            if let Some(x) = guard.get(key) {
                return Some(x);
            }
        }
        // The unlikely pessimistic case is that this item is in the weak references; let's try to get it out.
        self.weak_refs
            .read()
            .unwrap()
            .get(key)
            .and_then(|x| x.upgrade())
    }
fn search_for_item ( & self , key : & str ) -> Option < Arc < DecoderImpl :: Output > > { { let guard = self . pinned_entries . read ( ) . unwrap ( ) ; if let Some ( x ) = guard . get ( key ) { return Some ( ( * x ) . clone ( ) ) ; } } { let mut guard = self . decoded_cache . lock ( ) . unwrap ( ) ; if let Some ( x ) = guard . get ( key ) { return Some ( x ) ; } } // The unlikely pessimistic case is that this item is in the weak references; let's try to get it out. self . weak_refs . read ( ) . unwrap ( ) . get ( key ) . and_then ( | x | x . upgrade ( ) ) }
Find an item in the cache, returning `None` if it isn't currently cached.
Find an item in the cache returning ` None ` if it isn ' t currently cached .
&self
key
&str
&self
key
&str