pub struct AllocPolicy256;Expand description
Entity allocation policy for chunks of size 256.
Trait Implementations§
Source§impl IAllocPolicy for AllocPolicy256
impl IAllocPolicy for AllocPolicy256
Source§const CHUNK_SIZE_LOG2: usize = 8
const CHUNK_SIZE_LOG2: usize = 8
Chunk size log2 (e.g., 7 for 128, 8 for 256, etc.)
Source§const CHUNK_SIZE: usize
const CHUNK_SIZE: usize
Chunk size (e.g., 128, 256, etc.)
Source§const BITSET_LEN: usize
const BITSET_LEN: usize
Bitset length (number of u64 units in the bitset)
Source§const UNIT_ID_MASK: usize
const UNIT_ID_MASK: usize
Unit ID mask, usually CHUNK_SIZE - 1
Source§type BitAlloc = BitAlloc<4>
type BitAlloc = BitAlloc<4>
Bit allocator type.
MTB::Entity chooses different bit allocators
for different chunk sizes.Source§fn compose(chunk: u32, unit: u16, generation: NonZeroU16) -> GenIndex
fn compose(chunk: u32, unit: u16, generation: NonZeroU16) -> GenIndex
Compose a
GenIndex from chunk ID, unit ID, and generation.Source§fn chunkof_real(real_index: usize) -> u32
fn chunkof_real(real_index: usize) -> u32
Extract chunk ID from a real index.
Source§fn unitof_real(real_index: usize) -> u16
fn unitof_real(real_index: usize) -> u16
Extract unit ID from a real index.
Auto Trait Implementations§
impl Freeze for AllocPolicy256
impl RefUnwindSafe for AllocPolicy256
impl Send for AllocPolicy256
impl Sync for AllocPolicy256
impl Unpin for AllocPolicy256
impl UnsafeUnpin for AllocPolicy256
impl UnwindSafe for AllocPolicy256
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more