Trait Component

Source
pub trait Component {
    // Required methods
    fn get_archetypes() -> RwLockReadGuard<'static, Vec<ArchetypeId>>;
    fn add_archetype(arch: ArchetypeId)
       where Self: Sized;
    fn id() -> ComponentId
       where Self: Sized;
}

Required Methods§

Source

fn get_archetypes() -> RwLockReadGuard<'static, Vec<ArchetypeId>>

Gets all the archetypes that have this component. Only used internally

Source

fn add_archetype(arch: ArchetypeId)
where Self: Sized,

Add an archetype to this component. Only used internally

Source

fn id() -> ComponentId
where Self: Sized,

The id of this component. Only used internally

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§