pub fn peek<'a>(&'a mut self, k: &K) -> Option<&'a V> {
        let key = KeyRef { k };
        match self.map.get(&key) {
            None => None,
            Some(idx) => Some(self.entries.get(*idx).map(|entry| &entry.val).unwrap()),
        }
    }
/// Return the value corresponding to the key in the cache or `None` if it is not
/// present in the cache. Unlike `get`, `peek` does not update the key's usage bit.
///
/// # Example
///
/// ```
/// use clock_cache::ClockCache;
/// let mut cache = ClockCache::new(2);
///
/// cache.put(1, "a");
/// cache.put(2, "b");
///
/// assert_eq!(cache.peek(&1), Some(&"a"));
/// assert_eq!(cache.peek(&2), Some(&"b"));
/// ```
Return the value corresponding to the key in the cache or `None` if it is not
present in the cache. Unlike `get`, `peek` does not update the key's usage bit.
Return the value corresponding to the key in the cache or ` None ` if it is not present in the cache . Unlike ` get ` ` peek ` does not update the key ' s usage bit .
pub fn peek<'a>(&'a mut self, k: &K) -> Option<&'a V> {
        let key = KeyRef { k };
        match self.map.get(&key) {
            None => None,
            Some(idx) => Some(self.entries.get(*idx).map(|entry| &entry.val).unwrap()),
        }
    }
pub fn peek < ' a > ( & ' a mut self , k : & K ) -> Option < & ' a V > { let key = KeyRef { k } ; match self . map . get ( & key ) { None => None , Some ( idx ) => Some ( self . entries . get ( * idx ) . map ( | entry | & entry . val ) . unwrap ( ) ) , } }
Return the value corresponding to the key in the cache or `None` if it is not
present in the cache.
Return the value corresponding to the key in the cache or ` None ` if it is not present in the cache .
&'a mut self
k
&K
example
```
use clock_cache::ClockCache;
let mut cache = ClockCache::new(2).




` ` ` use clock_cache :: ClockCache ; let mut cache = ClockCache :: new ( 2 ) .