Struct chunked::archetype::Archetype [−][src]
pub struct Archetype { /* fields omitted */ }
An archetype represents a particular layout of an entity.
It contains a set of ComponentTypeID
s which are sorted for convenience.
Implementations
impl Archetype
[src]
impl Archetype
[src]pub fn component_types(&self) -> &ComponentVecSet
[src]
pub fn component_types(&self) -> &ComponentVecSet
[src]Return the sorted list of component types in this archetype.
pub fn chunk_capacity(&self) -> usize
[src]
pub fn chunk_capacity(&self) -> usize
[src]Get the maximum capacity of chunks in this Zone
.
pub fn chunk_layout(&self) -> Layout
[src]
pub fn chunk_layout(&self) -> Layout
[src]Get the required memory layout for a chunk.
pub fn has_component_type(&self, component_type: &ComponentTypeID) -> bool
[src]
pub fn has_component_type(&self, component_type: &ComponentTypeID) -> bool
[src]Returns true if this archetype contains the given component.
pub fn has_all_component_types<T: Deref<Target = ComponentTypeID>>(
&self,
component_types: impl IntoIterator<Item = T>
) -> bool
[src]
pub fn has_all_component_types<T: Deref<Target = ComponentTypeID>>(
&self,
component_types: impl IntoIterator<Item = T>
) -> bool
[src]Returns true if this archetype contains all of the given component types.
pub fn allocated_chunks(&self) -> usize
[src]
pub fn allocated_chunks(&self) -> usize
[src]Returns the number of chunks currently allocated in this zone.
This includes currently unused chunks in the free pool.
pub fn component_offsets(&self) -> &[usize]ⓘ
[src]
pub fn component_offsets(&self) -> &[usize]ⓘ
[src]Return an iterator over the component offsets of a Chunk.
pub fn component_offset(&self, component_type: ComponentTypeID) -> Option<usize>
[src]
pub fn component_offset(&self, component_type: ComponentTypeID) -> Option<usize>
[src]Get the offset into the chunk storage for a given component list.
pub fn allocate_page(&self) -> NonNull<u8>
[src]
pub fn allocate_page(&self) -> NonNull<u8>
[src]Allocate a new page for this Zone.
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T