Returns an iterator over all the values in the map.
(&self)
| 158 | |
| 159 | /// Returns an iterator over all the values in the map. |
| 160 | pub fn values(&self) -> impl ExactSizeIterator<Item = &V> { |
| 161 | match self { |
| 162 | Self::Small(list) => Either::Left(list.iter().map(|(_, v)| v)), |
| 163 | Self::Large(map) => Either::Right(map.values()), |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | /// Returns whether `key` is in the map. |
| 168 | pub fn contains_key(&self, key: &K) -> bool { |