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

Method get_sort_key

nodedb/src/engine/kv/sorted_index/tree.rs:143–145  ·  view source on GitHub ↗

Get the sort key for a primary key, if it exists.

(&self, primary_key: &[u8])

Source from the content-addressed store, hash-verified

141
142 /// Get the sort key for a primary key, if it exists.
143 pub fn get_sort_key(&self, primary_key: &[u8]) -> Option<&[u8]> {
144 self.key_to_sort.get(primary_key).map(|v| v.as_slice())
145 }
146
147 // ── AVL internal methods ───────────────────────────────────────────
148

Callers 3

windowed_rankFunction · 0.80
entry_in_windowFunction · 0.80
scoreMethod · 0.80

Calls 2

getMethod · 0.45
as_sliceMethod · 0.45

Tested by

no test coverage detected