Returns a reference to value mapped by `key`, if it exists. Does not affect the queue order.
(&self, key: &K)
| 90 | /// Returns a reference to value mapped by `key`, if it exists. |
| 91 | /// Does not affect the queue order. |
| 92 | pub fn peek(&self, key: &K) -> Option<&V> { |
| 93 | self.data.get(key).map(|(_, value)| value) |
| 94 | } |
| 95 | |
| 96 | /// Checks whether there is an entry with key `key` in the queue. |
| 97 | /// Does not affect the queue order. |