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§
Sourcefn get_archetypes() -> RwLockReadGuard<'static, Vec<ArchetypeId>>
fn get_archetypes() -> RwLockReadGuard<'static, Vec<ArchetypeId>>
Gets all the archetypes that have this component. Only used internally
Sourcefn add_archetype(arch: ArchetypeId)where
Self: Sized,
fn add_archetype(arch: ArchetypeId)where
Self: Sized,
Add an archetype to this component. Only used internally
Sourcefn id() -> ComponentIdwhere
Self: Sized,
fn id() -> ComponentIdwhere
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.