(prefix_bits: u8)
| 99 | // ── Internal helpers ────────────────────────────────────────────────────── |
| 100 | |
| 101 | fn validate_prefix_bits(prefix_bits: u8) -> Result<()> { |
| 102 | if prefix_bits == 0 || prefix_bits > 16 { |
| 103 | return Err(ClusterError::Codec { |
| 104 | detail: format!("array routing: prefix_bits must be 1-16, got {prefix_bits}"), |
| 105 | }); |
| 106 | } |
| 107 | Ok(()) |
| 108 | } |
| 109 | |
| 110 | /// Extract the top `prefix_bits` bits of a Hilbert prefix as a bucket index. |
| 111 | fn prefix_bucket(hilbert_prefix: u64, prefix_bits: u8) -> u32 { |
no outgoing calls
no test coverage detected