Iterate over the entries within the given range.
(
&'a self,
range: R,
forest: &'a MapForest<K, V>,
comp: &'a C,
)
| 241 | |
| 242 | /// Iterate over the entries within the given range. |
| 243 | pub fn range<'a, R, C>( |
| 244 | &'a self, |
| 245 | range: R, |
| 246 | forest: &'a MapForest<K, V>, |
| 247 | comp: &'a C, |
| 248 | ) -> MapRange<'a, K, V, C> |
| 249 | where |
| 250 | R: RangeBounds<K>, |
| 251 | C: Comparator<K>, |
| 252 | { |
| 253 | MapRange { |
| 254 | cursor: self.cursor(forest, comp), |
| 255 | start: copied_bound(range.start_bound()), |
| 256 | end: copied_bound(range.end_bound()), |
| 257 | direction: Direction::None, |
| 258 | } |
| 259 | } |
| 260 | } |
| 261 | |
| 262 | fn copied_bound<K>(start_bound: Bound<&K>) -> Bound<K> |