Skip to main content

size_of

Function size_of 

Source
pub fn size_of(index: usize) -> usize
Expand description

Slot size for a class index.

ยงExamples

use kevy_alloc::class::{index_of, size_of};
// Classes ascend, so a bigger request never lands in a smaller slot.
let small = size_of(index_of(8, 1).unwrap());
let big = size_of(index_of(200, 1).unwrap());
assert!(small <= big);