MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / drain_sorted

Method drain_sorted

nodedb/src/engine/array/memtable/tile_buffer.rs:288–290  ·  view source on GitHub ↗

Drain tiles in `TileId`-ascending order (BTreeMap guarantees this).

(&mut self)

Source from the content-addressed store, hash-verified

286
287 /// Drain tiles in `TileId`-ascending order (BTreeMap guarantees this).
288 pub fn drain_sorted(&mut self) -> Vec<(TileId, TileBuffer)> {
289 std::mem::take(&mut self.tiles).into_iter().collect()
290 }
291
292 pub fn iter(&self) -> impl Iterator<Item = (&TileId, &TileBuffer)> {
293 self.tiles.iter()

Callers 2

prepare_flushMethod · 0.80

Calls 2

takeFunction · 0.85
collectMethod · 0.80

Tested by 1