MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / range

Method range

cranelift/bforest/src/map.rs:243–259  ·  view source on GitHub ↗

Iterate over the entries within the given range.

(
        &'a self,
        range: R,
        forest: &'a MapForest<K, V>,
        comp: &'a C,
    )

Source from the content-addressed store, hash-verified

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
262fn copied_bound<K>(start_bound: Bound<&K>) -> Bound<K>

Callers 1

range_next_backFunction · 0.45

Calls 2

copied_boundFunction · 0.85
cursorMethod · 0.45

Tested by 1

range_next_backFunction · 0.36