(bytes: &[u8; 12])
| 97 | /// Decodes from 12 bytes. |
| 98 | #[inline] |
| 99 | pub fn from_bytes(bytes: &[u8; 12]) -> Self { |
| 100 | let change_id = NodeId::new(u64::from_le_bytes(bytes[0..8].try_into().unwrap())); |
| 101 | let file_idx = u32::from_le_bytes(bytes[8..12].try_into().unwrap()); |
| 102 | TrunkId { |
| 103 | change_id, |
| 104 | file_idx, |
| 105 | } |
| 106 | } |
| 107 | } |
| 108 | |
| 109 | impl fmt::Debug for TrunkId { |