pub fn index_of(size: usize, align: usize) -> Option<usize>Expand description
The class index serving size at align, or None when the request
belongs on the direct-mapping path (too large, or too strictly
aligned to serve from a class).
Slots sit at multiples of the class size inside a span, and span bases are 64 KiB-aligned, so a slot’s alignment is exactly the alignment of its class size. Serving a 16-byte alignment therefore means choosing a class that is a multiple of 16 — which, in the 8-stepped region below 128, is always the very next one.