(bytes: &[u8; 12])
| 291 | /// Decode a BranchId from 12 bytes. |
| 292 | #[inline] |
| 293 | pub fn decode_branch_id(bytes: &[u8; 12]) -> BranchId { |
| 294 | let change_id = NodeId::new(u64::from_le_bytes(bytes[0..8].try_into().unwrap())); |
| 295 | let branch_idx = u32::from_le_bytes(bytes[8..12].try_into().unwrap()); |
| 296 | BranchId::new(change_id, branch_idx) |
| 297 | } |
| 298 | |
| 299 | /// Encode a LeafId as 12 bytes for storage. |
| 300 | /// |