pub trait ArchetypeState: Send + Sync + 'static {
    // Required methods
    fn ty(&self) -> TypeId;
    fn as_ptr(&self) -> *const u8;
    fn forget(self);
    fn metadata(&self) -> ArchetypeMetadata;
    fn as_any(&self) -> &dyn Any;
    fn as_any_mut(&mut self) -> &mut dyn Any;
    fn num_components(&self) -> usize;

    // Provided method
    fn component_ids(&self) -> SmallVec<[TypeId; 32]> { ... }
}
Expand description

Defines archetype objects (entity states) with definite components.

Required Methods§

source

fn ty(&self) -> TypeId

source

fn as_ptr(&self) -> *const u8

source

fn forget(self)

source

fn metadata(&self) -> ArchetypeMetadata

source

fn as_any(&self) -> &dyn Any

source

fn as_any_mut(&mut self) -> &mut dyn Any

source

fn num_components(&self) -> usize

Provided Methods§

Implementations on Foreign Types§

source§

impl ArchetypeState for ()

source§

fn ty(&self) -> TypeId

source§

fn as_ptr(&self) -> *const u8

source§

fn forget(self)

source§

fn metadata(&self) -> ArchetypeMetadata

source§

fn as_any(&self) -> &dyn Any

source§

fn as_any_mut(&mut self) -> &mut dyn Any

source§

fn num_components(&self) -> usize

Implementors§