MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / encode_session_prefix

Function encode_session_prefix

atomic-core/src/change/session.rs:1018–1022  ·  view source on GitHub ↗
(provenance_id: u64)

Source from the content-addressed store, hash-verified

1016/// numeric values of `provenance_id`.
1017#[inline]
1018pub fn encode_session_prefix(provenance_id: u64) -> [u8; 16] {
1019 let mut key = [0u8; 16];
1020 key[0..8].copy_from_slice(&provenance_id.to_be_bytes());
1021 key
1022}
1023
1024// ---------------------------------------------------------------------------
1025// Tests

Callers 5

get_session_eventsMethod · 0.85
get_session_todosMethod · 0.85
get_session_phasesMethod · 0.85
test_session_prefixFunction · 0.85

Calls

no outgoing calls

Tested by 2

test_session_prefixFunction · 0.68