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

Function decode_view_seq

atomic-core/src/pristine/tables.rs:849–853  ·  view source on GitHub ↗
(key: &[u8; 16])

Source from the content-addressed store, hash-verified

847/// Decode a view-sequence pair from 16 bytes
848#[inline]
849pub fn decode_view_seq(key: &[u8; 16]) -> (u64, u64) {
850 let view_id = u64::from_be_bytes(key[0..8].try_into().unwrap());
851 let seq = u64::from_be_bytes(key[8..16].try_into().unwrap());
852 (view_id, seq)
853}
854
855/// Encode a view-merkle pair as 40 bytes
856#[inline]

Callers 3

iter_changesMethod · 0.85
iter_changesMethod · 0.85

Calls 1

unwrapMethod · 0.45

Tested by 1