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

Function decode_position

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

Source from the content-addressed store, hash-verified

1122/// Decode a position from 16 bytes
1123#[inline]
1124pub fn decode_position(key: &[u8; 16]) -> (u64, u64) {
1125 let change_id = u64::from_be_bytes(key[0..8].try_into().unwrap());
1126 let pos = u64::from_be_bytes(key[8..16].try_into().unwrap());
1127 (change_id, pos)
1128}
1129
1130/// Encode a view-sequence pair as 16 bytes
1131#[inline]

Callers 11

export_skeletonMethod · 0.85
export_graph_sliceMethod · 0.85
inode_positionMethod · 0.85
snapshot_inodesMethod · 0.85
snapshot_rev_inodesMethod · 0.85
del_inodeMethod · 0.85
inode_positionMethod · 0.85
snapshot_inodesMethod · 0.85
snapshot_rev_inodesMethod · 0.85

Calls 1

unwrapMethod · 0.45

Tested by 1