Trait ambient_api_core::ecs::ConceptComponents
source · pub trait ConceptComponents: Concept {
type Required: ComponentsTuple + Copy + 'static;
type Optional: ComponentsTuple + Copy + 'static;
// Required methods
fn required() -> Self::Required;
fn optional() -> Self::Optional;
fn from_required_data(
required: <Self::Required as ComponentsTuple>::Data
) -> Self;
// Provided method
fn as_query() -> ConceptQuery<Self>
where Self: Sized { ... }
}
Expand description
Provides component tuples for this concept.
Required Associated Types§
sourcetype Required: ComponentsTuple + Copy + 'static
type Required: ComponentsTuple + Copy + 'static
A tuple of the required components for this concept.
sourcetype Optional: ComponentsTuple + Copy + 'static
type Optional: ComponentsTuple + Copy + 'static
A tuple of the optional components for this concept.
Required Methods§
sourcefn from_required_data(
required: <Self::Required as ComponentsTuple>::Data
) -> Self
fn from_required_data( required: <Self::Required as ComponentsTuple>::Data ) -> Self
Converts a tuple of data back to a concept.
Provided Methods§
sourcefn as_query() -> ConceptQuery<Self>where
Self: Sized,
fn as_query() -> ConceptQuery<Self>where
Self: Sized,
Creates a ConceptQuery
that can be passed into queries.
Note that this will only get the required components of the concept, and not the optional components!
Object Safety§
This trait is not object safe.