(tier_idx: u8, slot_idx: u32)
| 309 | const SLOT_MASK: u32 = (1 << 28) - 1; |
| 310 | |
| 311 | fn encode_handle(tier_idx: u8, slot_idx: u32) -> u32 { |
| 312 | debug_assert!(tier_idx < 8); |
| 313 | debug_assert!(slot_idx <= SLOT_MASK); |
| 314 | ((tier_idx as u32) << TIER_SHIFT) | slot_idx |
| 315 | } |
| 316 | |
| 317 | fn decode_handle(handle: u32) -> (u8, u32) { |
| 318 | let tier_idx = ((handle >> TIER_SHIFT) & 0x7) as u8; |
no outgoing calls