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

Function encode_view_seq

atomic-core/src/pristine/tables.rs:880–885  ·  view source on GitHub ↗
(view_id: u64, seq: u64)

Source from the content-addressed store, hash-verified

878/// Encode a view-sequence pair as 16 bytes
879#[inline]
880pub fn encode_view_seq(view_id: u64, seq: u64) -> [u8; 16] {
881 let mut key = [0u8; 16];
882 key[0..8].copy_from_slice(&view_id.to_be_bytes());
883 key[8..16].copy_from_slice(&seq.to_be_bytes());
884 key
885}
886
887/// Decode a view-sequence pair from 16 bytes
888#[inline]

Callers 15

get_conflictsMethod · 0.85
iter_conflictsMethod · 0.85
get_change_seqMethod · 0.85
get_change_at_seqMethod · 0.85
iter_changesMethod · 0.85
put_changeMethod · 0.85
del_changeMethod · 0.85
reinsert_changeMethod · 0.85
del_viewMethod · 0.85
put_conflictsMethod · 0.85

Calls

no outgoing calls