Get the element at `k` if it exists.
(&self, k: K)
| 45 | |
| 46 | /// Get the element at `k` if it exists. |
| 47 | pub fn get(&self, k: K) -> Option<&V> { |
| 48 | self.elems.get(k.index()) |
| 49 | } |
| 50 | |
| 51 | /// Get the element at `k` if it exists, mutable version. |
| 52 | pub fn get_mut(&mut self, k: K) -> Option<&mut V> { |