IntoQuery

Trait IntoQuery 

Source
pub trait IntoQuery<'a> {
    type Query;

    // Required method
    fn into_query(self) -> Self::Query;
}
Expand description

A trait for converting a value into some kind of query.

This crate provides implementations for ComponentVecs. More specifically it provides generic implementations for tuples of types that implement IntoRefOrMut.

§Examples

See Query for more interesting examples.

use checs::{ComponentVec, IntoQuery};

let ints: ComponentVec<i32> = ComponentVec::new();
let mut floats: ComponentVec<f32> = ComponentVec::new();

let query = (&ints, &mut floats).into_query();

Required Associated Types§

Source

type Query

The type of the query.

Required Methods§

Source

fn into_query(self) -> Self::Query

Creates a query from a value.

Implementations on Foreign Types§

Source§

impl<'a, A, B, C, D, E, F, G> IntoQuery<'a> for (A, B, C, D, E, F, G)
where A: IntoRefOrMut<'a>, B: IntoRefOrMut<'a>, C: IntoRefOrMut<'a>, D: IntoRefOrMut<'a>, E: IntoRefOrMut<'a>, F: IntoRefOrMut<'a>, G: IntoRefOrMut<'a>,

Source§

impl<'a, B, C, D, E, F, G> IntoQuery<'a> for (B, C, D, E, F, G)
where B: IntoRefOrMut<'a>, C: IntoRefOrMut<'a>, D: IntoRefOrMut<'a>, E: IntoRefOrMut<'a>, F: IntoRefOrMut<'a>, G: IntoRefOrMut<'a>,

Source§

impl<'a, C, D, E, F, G> IntoQuery<'a> for (C, D, E, F, G)
where C: IntoRefOrMut<'a>, D: IntoRefOrMut<'a>, E: IntoRefOrMut<'a>, F: IntoRefOrMut<'a>, G: IntoRefOrMut<'a>,

Source§

impl<'a, D, E, F, G> IntoQuery<'a> for (D, E, F, G)
where D: IntoRefOrMut<'a>, E: IntoRefOrMut<'a>, F: IntoRefOrMut<'a>, G: IntoRefOrMut<'a>,

Source§

impl<'a, E, F, G> IntoQuery<'a> for (E, F, G)
where E: IntoRefOrMut<'a>, F: IntoRefOrMut<'a>, G: IntoRefOrMut<'a>,

Source§

type Query = Query<Intersection<'a, Intersection<'a, Copied<Iter<'a, Entity>>>>, (RefOrMut<'a, <E as IntoRefOrMut<'a>>::Components>, RefOrMut<'a, <F as IntoRefOrMut<'a>>::Components>, RefOrMut<'a, <G as IntoRefOrMut<'a>>::Components>)>

Source§

fn into_query(self) -> Self::Query

Source§

impl<'a, F, G> IntoQuery<'a> for (F, G)
where F: IntoRefOrMut<'a>, G: IntoRefOrMut<'a>,

Source§

type Query = Query<Intersection<'a, Copied<Iter<'a, Entity>>>, (RefOrMut<'a, <F as IntoRefOrMut<'a>>::Components>, RefOrMut<'a, <G as IntoRefOrMut<'a>>::Components>)>

Source§

fn into_query(self) -> Self::Query

Source§

impl<'a, T> IntoQuery<'a> for (&'a ComponentVec<T>,)
where T: 'a,

Source§

type Query = Zip<Copied<Iter<'a, Entity>>, Iter<'a, T>>

Source§

fn into_query(self) -> Self::Query

Source§

impl<'a, T> IntoQuery<'a> for (&'a mut ComponentVec<T>,)
where T: 'a,

Source§

type Query = Zip<Copied<Iter<'a, Entity>>, IterMut<'a, T>>

Source§

fn into_query(self) -> Self::Query

Implementors§

Source§

impl<'a, T> IntoQuery<'a> for &'a ComponentVec<T>
where T: 'a,

Source§

type Query = Zip<Copied<Iter<'a, Entity>>, Iter<'a, T>>

Source§

impl<'a, T> IntoQuery<'a> for &'a mut ComponentVec<T>
where T: 'a,

Source§

type Query = Zip<Copied<Iter<'a, Entity>>, IterMut<'a, T>>