Returns the last element that was inserted in the map.
(&self)
| 144 | |
| 145 | /// Returns the last element that was inserted in the map. |
| 146 | pub fn last(&self) -> Option<(K, &V)> { |
| 147 | let len = self.elems.len(); |
| 148 | let last = self.elems.last()?; |
| 149 | Some((K::new(len - 1), last)) |
| 150 | } |
| 151 | |
| 152 | /// Returns the last element that was inserted in the map. |
| 153 | pub fn last_mut(&mut self) -> Option<(K, &mut V)> { |