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

Function file_key

atomic-core/src/pristine/span_patch_storage.rs:34–39  ·  view source on GitHub ↗
(file: &ExternalFile)

Source from the content-addressed store, hash-verified

32pub(super) const APPLIED: TableDefinition<u64, u8> = TableDefinition::new("span_patch_applied_v1");
33
34fn file_key(file: &ExternalFile) -> [u8; 36] {
35 let mut key = [0; 36];
36 key[..32].copy_from_slice(file.owner.as_bytes());
37 key[32..].copy_from_slice(&file.ordinal.to_be_bytes());
38 key
39}
40
41fn words<const N: usize>(values: [u64; N]) -> Vec<u8> {
42 values.into_iter().flat_map(u64::to_be_bytes).collect()

Callers 3

prepare_legacy_filesFunction · 0.85
index_changeFunction · 0.85
record_stateMethod · 0.85

Calls 1

as_bytesMethod · 0.45

Tested by

no test coverage detected