(bytes: &[u8; 12])
| 317 | /// Decode a LeafId from 12 bytes. |
| 318 | #[inline] |
| 319 | pub fn decode_leaf_id(bytes: &[u8; 12]) -> LeafId { |
| 320 | let change_id = NodeId::new(u64::from_le_bytes(bytes[0..8].try_into().unwrap())); |
| 321 | let leaf_idx = u32::from_le_bytes(bytes[8..12].try_into().unwrap()); |
| 322 | LeafId::new(change_id, leaf_idx) |
| 323 | } |
| 324 | |
| 325 | // Span Position Encoding/Decoding (24 bytes) |
| 326 |