pub trait ComponentLayout: Sized {
type Filter: for<'a> Filter<ArchetypeFilterData<'a>>;
// Required methods
fn get_filter(&mut self) -> &mut Self::Filter;
fn tailor_archetype(&self, archetype: &mut ArchetypeDescription);
}Expand description
Describes the types of a set of components attached to an entity.
Required Associated Types§
Sourcetype Filter: for<'a> Filter<ArchetypeFilterData<'a>>
type Filter: for<'a> Filter<ArchetypeFilterData<'a>>
A filter type which filters archetypes to an exact match with this layout.
Required Methods§
Sourcefn get_filter(&mut self) -> &mut Self::Filter
fn get_filter(&mut self) -> &mut Self::Filter
Gets the archetype filter for this layout.
Sourcefn tailor_archetype(&self, archetype: &mut ArchetypeDescription)
fn tailor_archetype(&self, archetype: &mut ArchetypeDescription)
Modifies an archetype description to include the components described by this layout.
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.