Get the slice of values associated with the given range of keys, if any.
(&self, range: core::ops::Range<K>)
| 77 | |
| 78 | /// Get the slice of values associated with the given range of keys, if any. |
| 79 | pub fn get_range(&self, range: core::ops::Range<K>) -> Option<&[V]> { |
| 80 | self.elems.get(range.start.index()..range.end.index()) |
| 81 | } |
| 82 | |
| 83 | /// Get the element at `k` if it exists, mutable version. |
| 84 | pub fn get_mut(&mut self, k: K) -> Option<&mut V> { |