Returns an iterator over key-value pairs in a range. If start_key is None, starts from the beginning. If end_key is None, goes to the end.
(
&'a self,
start_key: Option<&K>,
end_key: Option<&'a K>,
)
| 82 | /// If start_key is None, starts from the beginning. |
| 83 | /// If end_key is None, goes to the end. |
| 84 | pub fn items_range<'a>( |
| 85 | &'a self, |
| 86 | start_key: Option<&K>, |
| 87 | end_key: Option<&'a K>, |
| 88 | ) -> RangeIterator<'a, K, V> { |
| 89 | let start_bound = start_key.map_or(Bound::Unbounded, Bound::Included); |
| 90 | let end_bound = end_key.map_or(Bound::Unbounded, Bound::Excluded); |
| 91 | |
| 92 | let (start_info, skip_first, end_info) = |
| 93 | self.resolve_range_bounds((start_bound, end_bound)); |
| 94 | RangeIterator::new_with_skip_owned(self, start_info, skip_first, end_info) |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | // ============================================================================ |