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

Function file_key

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

Source from the content-addressed store, hash-verified

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

Callers 1

index_changeFunction · 0.85

Calls 1

as_bytesMethod · 0.45

Tested by

no test coverage detected