(id: &BranchId)
| 282 | /// ``` |
| 283 | #[inline] |
| 284 | pub fn encode_branch_id(id: &BranchId) -> [u8; 12] { |
| 285 | let mut bytes = [0u8; 12]; |
| 286 | bytes[0..8].copy_from_slice(&id.change_id().get().to_le_bytes()); |
| 287 | bytes[8..12].copy_from_slice(&id.branch_idx().to_le_bytes()); |
| 288 | bytes |
| 289 | } |
| 290 | |
| 291 | /// Decode a BranchId from 12 bytes. |
| 292 | #[inline] |