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

Method get_cell_bytes

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

Return the raw stored bytes (encoded `CellPayload` or sentinel) for the given `coord`, or `None` if the coord is not present in this tile version.

(&self, coord: &[CoordValue])

Source from the content-addressed store, hash-verified

67 /// Return the raw stored bytes (encoded `CellPayload` or sentinel) for the
68 /// given `coord`, or `None` if the coord is not present in this tile version.
69 pub fn get_cell_bytes(&self, coord: &[CoordValue]) -> Option<&[u8]> {
70 let key = Self::encode_coord(&coord.to_vec()).ok()?;
71 self.entries.get(&key).map(|v| v.as_slice())
72 }
73
74 /// Insert or overwrite a cell version. `payload_bytes` must be the
75 /// zerompk encoding of a [`CellPayload`].

Callers 2

Calls 4

okMethod · 0.45
to_vecMethod · 0.45
getMethod · 0.45
as_sliceMethod · 0.45

Tested by 1