Skip to main content

id_key

Function id_key 

Source
pub fn id_key(id: u64) -> [u8; 8]
Expand description

A node id or an edge slot, as the bytes a document collection is keyed by.

Big endian, so that the keys sort the way the numbers do. Eight bytes for both, because an edge slot is a u32 and widening it here means the two stores are the same shape and a later move to u64 slots is not a format change.