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

Function op_key

nodedb/src/control/array_sync/op_log.rs:44–48  ·  view source on GitHub ↗

Build the composite op key: `[name_len: u8][name: bytes][hlc: 18]`.

(array: &str, hlc: Hlc)

Source from the content-addressed store, hash-verified

42
43/// Build the composite op key: `[name_len: u8][name: bytes][hlc: 18]`.
44fn op_key(array: &str, hlc: Hlc) -> Option<Vec<u8>> {
45 let mut key = name_prefix(array)?;
46 key.extend_from_slice(&hlc.to_bytes());
47 Some(key)
48}
49
50/// Parse the HLC from the tail of a composite key.
51///

Callers 1

appendMethod · 0.85

Calls 2

name_prefixFunction · 0.70
to_bytesMethod · 0.45

Tested by

no test coverage detected