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

Function encode_view_seq

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

Source from the content-addressed store, hash-verified

1130/// Encode a view-sequence pair as 16 bytes
1131#[inline]
1132pub fn encode_view_seq(view_id: u64, seq: u64) -> [u8; 16] {
1133 let mut key = [0u8; 16];
1134 key[0..8].copy_from_slice(&view_id.to_be_bytes());
1135 key[8..16].copy_from_slice(&seq.to_be_bytes());
1136 key
1137}
1138
1139/// Decode a view-sequence pair from 16 bytes
1140#[inline]

Callers 15

export_graph_sliceMethod · 0.85
import_graph_sliceMethod · 0.85
import_view_snapshotMethod · 0.85
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

Calls

no outgoing calls