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§

source

type Required: ComponentsTuple + Copy + 'static

A tuple of the required components for this concept.

source

type Optional: ComponentsTuple + Copy + 'static

A tuple of the optional components for this concept.

Required Methods§

source

fn required() -> Self::Required

Returns a tuple of the required components for this concept.

source

fn optional() -> Self::Optional

Returns a tuple of the optional components for this concept.

source

fn from_required_data( required: <Self::Required as ComponentsTuple>::Data ) -> Self

Converts a tuple of data back to a concept.

Provided Methods§

source

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.

Implementors§

source§

impl ConceptComponents for Camera

source§

impl ConceptComponents for OrthographicCamera

source§

impl ConceptComponents for PerspectiveCamera

source§

impl ConceptComponents for PerspectiveCommonCamera

source§

impl ConceptComponents for PerspectiveInfiniteReverseCamera

source§

impl ConceptComponents for Package

source§

impl ConceptComponents for CharacterController

source§

impl ConceptComponents for Capsule

source§

impl ConceptComponents for Sphere

source§

impl ConceptComponents for Torus

source§

impl ConceptComponents for Transformable

source§

impl ConceptComponents for Module