(value: &[u8; 52])
| 365 | /// Returns (mtime_secs, mtime_nanos, file_size, content_hash). |
| 366 | #[inline] |
| 367 | pub fn decode_file_index(value: &[u8; 52]) -> (i64, u32, u64, crate::types::Hash) { |
| 368 | let mtime_secs = i64::from_le_bytes(value[0..8].try_into().unwrap()); |
| 369 | let mtime_nanos = u32::from_le_bytes(value[8..12].try_into().unwrap()); |
| 370 | let file_size = u64::from_le_bytes(value[12..20].try_into().unwrap()); |
| 371 | let mut hash_bytes = [0u8; 32]; |
| 372 | hash_bytes.copy_from_slice(&value[20..52]); |
| 373 | ( |
| 374 | mtime_secs, |
| 375 | mtime_nanos, |
| 376 | file_size, |
| 377 | crate::types::Merkle(hash_bytes), |
| 378 | ) |
| 379 | } |
| 380 | |
| 381 | // V3 Change Storage Tables |
| 382 | // |
no test coverage detected