MCPcopy Create free account
hub / github.com/KentBeck/BPlusTree3 / items_range

Method items_range

rust/src/iteration.rs:84–95  ·  view source on GitHub ↗

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>,
    )

Source from the content-addressed store, hash-verified

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// ============================================================================

Calls 1

resolve_range_boundsMethod · 0.80