Skip to main content

ArchQuery

Trait ArchQuery 

Source
pub unsafe trait ArchQuery {
    type Item<'a>;

    // Required method
    unsafe fn fetch(
        arch_storage: *mut ArchEntityStorage,
        index: ArchStorageIndex,
        comp_factory: &ComponentFactory,
    ) -> Self::Item<'_>;

    // Provided methods
    fn merge_prime_arch_key_with(
        _pkey: &mut PrimeArchKey,
        _comp_factory: &ComponentFactory,
    ) { ... }
    unsafe fn iter_query_matches<'a>(
        arch_storages: *mut ArchStorages,
        comp_factory: &'a ComponentFactory,
    ) -> impl Iterator<Item = Self::Item<'a>> + 'a { ... }
    unsafe fn iter_filtered_query_matches<F: ArchFilter>(
        arch_storages: *mut ArchStorages,
        comp_factory: &ComponentFactory,
    ) -> impl Iterator<Item = Self::Item<'_>> { ... }
}

Required Associated Types§

Source

type Item<'a>

Required Methods§

Source

unsafe fn fetch( arch_storage: *mut ArchEntityStorage, index: ArchStorageIndex, comp_factory: &ComponentFactory, ) -> Self::Item<'_>

§Safety
  1. The caller must ensure that the ArchStorageIndex is withing the bounds of the [ArchStorage] (as specified in [ArchStorage::get_component_unchecked]).
  2. The caller must ensure that the raw pointer to [ArchStorage] is valid, and usable.

Provided Methods§

Source

fn merge_prime_arch_key_with( _pkey: &mut PrimeArchKey, _comp_factory: &ComponentFactory, )

Source

unsafe fn iter_query_matches<'a>( arch_storages: *mut ArchStorages, comp_factory: &'a ComponentFactory, ) -> impl Iterator<Item = Self::Item<'a>> + 'a

§Safety
  1. The caller must ensure that the raw pointer to ArchStorages is valid, and usable.
Source

unsafe fn iter_filtered_query_matches<F: ArchFilter>( arch_storages: *mut ArchStorages, comp_factory: &ComponentFactory, ) -> impl Iterator<Item = Self::Item<'_>>

§Safety
  1. The caller must ensure that the raw pointer to ArchStorages is valid, and usable.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ArchQuery for ()

Source§

type Item<'a> = ()

Source§

unsafe fn fetch<'a>( arch_storage: *mut ArchEntityStorage, index: ArchStorageIndex, comp_factory: &'a ComponentFactory, ) -> Self::Item<'a>

Source§

fn merge_prime_arch_key_with( pkey: &mut PrimeArchKey, comp_factory: &ComponentFactory, )

Source§

impl<C: Component> ArchQuery for &C

Source§

type Item<'a> = &'a C

Source§

unsafe fn fetch( arch_storage: *mut ArchEntityStorage, index: ArchStorageIndex, comp_factory: &ComponentFactory, ) -> Self::Item<'_>

Source§

fn merge_prime_arch_key_with( pkey: &mut PrimeArchKey, comp_factory: &ComponentFactory, )

Source§

impl<C: Component> ArchQuery for &mut C

Source§

type Item<'a> = &'a mut C

Source§

unsafe fn fetch( arch_storage: *mut ArchEntityStorage, index: ArchStorageIndex, comp_factory: &ComponentFactory, ) -> Self::Item<'_>

Source§

fn merge_prime_arch_key_with( pkey: &mut PrimeArchKey, comp_factory: &ComponentFactory, )

Source§

impl<C: Component> ArchQuery for Option<&C>

Source§

type Item<'a> = Option<&'a C>

Source§

unsafe fn fetch( arch_storage: *mut ArchEntityStorage, index: ArchStorageIndex, comp_factory: &ComponentFactory, ) -> Self::Item<'_>

Source§

impl<C: Component> ArchQuery for Option<&mut C>

Source§

type Item<'a> = Option<&'a mut C>

Source§

unsafe fn fetch( arch_storage: *mut ArchEntityStorage, index: ArchStorageIndex, comp_factory: &ComponentFactory, ) -> Self::Item<'_>

Source§

impl<Q0: ArchQuery, Q1: ArchQuery, Q2: ArchQuery, Q3: ArchQuery, Q4: ArchQuery, Q5: ArchQuery, Q6: ArchQuery, Q7: ArchQuery, Q8: ArchQuery, Q9: ArchQuery, Q10: ArchQuery, Q11: ArchQuery> ArchQuery for (Q0, Q1, Q2, Q3, Q4, Q5, Q6, Q7, Q8, Q9, Q10, Q11)

Source§

type Item<'a> = (<Q0 as ArchQuery>::Item<'a>, <Q1 as ArchQuery>::Item<'a>, <Q2 as ArchQuery>::Item<'a>, <Q3 as ArchQuery>::Item<'a>, <Q4 as ArchQuery>::Item<'a>, <Q5 as ArchQuery>::Item<'a>, <Q6 as ArchQuery>::Item<'a>, <Q7 as ArchQuery>::Item<'a>, <Q8 as ArchQuery>::Item<'a>, <Q9 as ArchQuery>::Item<'a>, <Q10 as ArchQuery>::Item<'a>, <Q11 as ArchQuery>::Item<'a>)

Source§

unsafe fn fetch<'a>( arch_storage: *mut ArchEntityStorage, index: ArchStorageIndex, comp_factory: &'a ComponentFactory, ) -> Self::Item<'a>

Source§

fn merge_prime_arch_key_with( pkey: &mut PrimeArchKey, comp_factory: &ComponentFactory, )

Source§

impl<Q0: ArchQuery, Q1: ArchQuery, Q2: ArchQuery, Q3: ArchQuery, Q4: ArchQuery, Q5: ArchQuery, Q6: ArchQuery, Q7: ArchQuery, Q8: ArchQuery, Q9: ArchQuery, Q10: ArchQuery> ArchQuery for (Q0, Q1, Q2, Q3, Q4, Q5, Q6, Q7, Q8, Q9, Q10)

Source§

type Item<'a> = (<Q0 as ArchQuery>::Item<'a>, <Q1 as ArchQuery>::Item<'a>, <Q2 as ArchQuery>::Item<'a>, <Q3 as ArchQuery>::Item<'a>, <Q4 as ArchQuery>::Item<'a>, <Q5 as ArchQuery>::Item<'a>, <Q6 as ArchQuery>::Item<'a>, <Q7 as ArchQuery>::Item<'a>, <Q8 as ArchQuery>::Item<'a>, <Q9 as ArchQuery>::Item<'a>, <Q10 as ArchQuery>::Item<'a>)

Source§

unsafe fn fetch<'a>( arch_storage: *mut ArchEntityStorage, index: ArchStorageIndex, comp_factory: &'a ComponentFactory, ) -> Self::Item<'a>

Source§

fn merge_prime_arch_key_with( pkey: &mut PrimeArchKey, comp_factory: &ComponentFactory, )

Source§

impl<Q0: ArchQuery, Q1: ArchQuery, Q2: ArchQuery, Q3: ArchQuery, Q4: ArchQuery, Q5: ArchQuery, Q6: ArchQuery, Q7: ArchQuery, Q8: ArchQuery, Q9: ArchQuery> ArchQuery for (Q0, Q1, Q2, Q3, Q4, Q5, Q6, Q7, Q8, Q9)

Source§

type Item<'a> = (<Q0 as ArchQuery>::Item<'a>, <Q1 as ArchQuery>::Item<'a>, <Q2 as ArchQuery>::Item<'a>, <Q3 as ArchQuery>::Item<'a>, <Q4 as ArchQuery>::Item<'a>, <Q5 as ArchQuery>::Item<'a>, <Q6 as ArchQuery>::Item<'a>, <Q7 as ArchQuery>::Item<'a>, <Q8 as ArchQuery>::Item<'a>, <Q9 as ArchQuery>::Item<'a>)

Source§

unsafe fn fetch<'a>( arch_storage: *mut ArchEntityStorage, index: ArchStorageIndex, comp_factory: &'a ComponentFactory, ) -> Self::Item<'a>

Source§

fn merge_prime_arch_key_with( pkey: &mut PrimeArchKey, comp_factory: &ComponentFactory, )

Source§

impl<Q0: ArchQuery, Q1: ArchQuery, Q2: ArchQuery, Q3: ArchQuery, Q4: ArchQuery, Q5: ArchQuery, Q6: ArchQuery, Q7: ArchQuery, Q8: ArchQuery> ArchQuery for (Q0, Q1, Q2, Q3, Q4, Q5, Q6, Q7, Q8)

Source§

type Item<'a> = (<Q0 as ArchQuery>::Item<'a>, <Q1 as ArchQuery>::Item<'a>, <Q2 as ArchQuery>::Item<'a>, <Q3 as ArchQuery>::Item<'a>, <Q4 as ArchQuery>::Item<'a>, <Q5 as ArchQuery>::Item<'a>, <Q6 as ArchQuery>::Item<'a>, <Q7 as ArchQuery>::Item<'a>, <Q8 as ArchQuery>::Item<'a>)

Source§

unsafe fn fetch<'a>( arch_storage: *mut ArchEntityStorage, index: ArchStorageIndex, comp_factory: &'a ComponentFactory, ) -> Self::Item<'a>

Source§

fn merge_prime_arch_key_with( pkey: &mut PrimeArchKey, comp_factory: &ComponentFactory, )

Source§

impl<Q0: ArchQuery, Q1: ArchQuery, Q2: ArchQuery, Q3: ArchQuery, Q4: ArchQuery, Q5: ArchQuery, Q6: ArchQuery, Q7: ArchQuery> ArchQuery for (Q0, Q1, Q2, Q3, Q4, Q5, Q6, Q7)

Source§

type Item<'a> = (<Q0 as ArchQuery>::Item<'a>, <Q1 as ArchQuery>::Item<'a>, <Q2 as ArchQuery>::Item<'a>, <Q3 as ArchQuery>::Item<'a>, <Q4 as ArchQuery>::Item<'a>, <Q5 as ArchQuery>::Item<'a>, <Q6 as ArchQuery>::Item<'a>, <Q7 as ArchQuery>::Item<'a>)

Source§

unsafe fn fetch<'a>( arch_storage: *mut ArchEntityStorage, index: ArchStorageIndex, comp_factory: &'a ComponentFactory, ) -> Self::Item<'a>

Source§

fn merge_prime_arch_key_with( pkey: &mut PrimeArchKey, comp_factory: &ComponentFactory, )

Source§

impl<Q0: ArchQuery, Q1: ArchQuery, Q2: ArchQuery, Q3: ArchQuery, Q4: ArchQuery, Q5: ArchQuery, Q6: ArchQuery> ArchQuery for (Q0, Q1, Q2, Q3, Q4, Q5, Q6)

Source§

type Item<'a> = (<Q0 as ArchQuery>::Item<'a>, <Q1 as ArchQuery>::Item<'a>, <Q2 as ArchQuery>::Item<'a>, <Q3 as ArchQuery>::Item<'a>, <Q4 as ArchQuery>::Item<'a>, <Q5 as ArchQuery>::Item<'a>, <Q6 as ArchQuery>::Item<'a>)

Source§

unsafe fn fetch<'a>( arch_storage: *mut ArchEntityStorage, index: ArchStorageIndex, comp_factory: &'a ComponentFactory, ) -> Self::Item<'a>

Source§

fn merge_prime_arch_key_with( pkey: &mut PrimeArchKey, comp_factory: &ComponentFactory, )

Source§

impl<Q0: ArchQuery, Q1: ArchQuery, Q2: ArchQuery, Q3: ArchQuery, Q4: ArchQuery, Q5: ArchQuery> ArchQuery for (Q0, Q1, Q2, Q3, Q4, Q5)

Source§

type Item<'a> = (<Q0 as ArchQuery>::Item<'a>, <Q1 as ArchQuery>::Item<'a>, <Q2 as ArchQuery>::Item<'a>, <Q3 as ArchQuery>::Item<'a>, <Q4 as ArchQuery>::Item<'a>, <Q5 as ArchQuery>::Item<'a>)

Source§

unsafe fn fetch<'a>( arch_storage: *mut ArchEntityStorage, index: ArchStorageIndex, comp_factory: &'a ComponentFactory, ) -> Self::Item<'a>

Source§

fn merge_prime_arch_key_with( pkey: &mut PrimeArchKey, comp_factory: &ComponentFactory, )

Source§

impl<Q0: ArchQuery, Q1: ArchQuery, Q2: ArchQuery, Q3: ArchQuery, Q4: ArchQuery> ArchQuery for (Q0, Q1, Q2, Q3, Q4)

Source§

type Item<'a> = (<Q0 as ArchQuery>::Item<'a>, <Q1 as ArchQuery>::Item<'a>, <Q2 as ArchQuery>::Item<'a>, <Q3 as ArchQuery>::Item<'a>, <Q4 as ArchQuery>::Item<'a>)

Source§

unsafe fn fetch<'a>( arch_storage: *mut ArchEntityStorage, index: ArchStorageIndex, comp_factory: &'a ComponentFactory, ) -> Self::Item<'a>

Source§

fn merge_prime_arch_key_with( pkey: &mut PrimeArchKey, comp_factory: &ComponentFactory, )

Source§

impl<Q0: ArchQuery, Q1: ArchQuery, Q2: ArchQuery, Q3: ArchQuery> ArchQuery for (Q0, Q1, Q2, Q3)

Source§

type Item<'a> = (<Q0 as ArchQuery>::Item<'a>, <Q1 as ArchQuery>::Item<'a>, <Q2 as ArchQuery>::Item<'a>, <Q3 as ArchQuery>::Item<'a>)

Source§

unsafe fn fetch<'a>( arch_storage: *mut ArchEntityStorage, index: ArchStorageIndex, comp_factory: &'a ComponentFactory, ) -> Self::Item<'a>

Source§

fn merge_prime_arch_key_with( pkey: &mut PrimeArchKey, comp_factory: &ComponentFactory, )

Source§

impl<Q0: ArchQuery, Q1: ArchQuery, Q2: ArchQuery> ArchQuery for (Q0, Q1, Q2)

Source§

type Item<'a> = (<Q0 as ArchQuery>::Item<'a>, <Q1 as ArchQuery>::Item<'a>, <Q2 as ArchQuery>::Item<'a>)

Source§

unsafe fn fetch<'a>( arch_storage: *mut ArchEntityStorage, index: ArchStorageIndex, comp_factory: &'a ComponentFactory, ) -> Self::Item<'a>

Source§

fn merge_prime_arch_key_with( pkey: &mut PrimeArchKey, comp_factory: &ComponentFactory, )

Source§

impl<Q0: ArchQuery, Q1: ArchQuery> ArchQuery for (Q0, Q1)

Source§

type Item<'a> = (<Q0 as ArchQuery>::Item<'a>, <Q1 as ArchQuery>::Item<'a>)

Source§

unsafe fn fetch<'a>( arch_storage: *mut ArchEntityStorage, index: ArchStorageIndex, comp_factory: &'a ComponentFactory, ) -> Self::Item<'a>

Source§

fn merge_prime_arch_key_with( pkey: &mut PrimeArchKey, comp_factory: &ComponentFactory, )

Source§

impl<Q0: ArchQuery> ArchQuery for (Q0,)

Source§

type Item<'a> = (<Q0 as ArchQuery>::Item<'a>,)

Source§

unsafe fn fetch<'a>( arch_storage: *mut ArchEntityStorage, index: ArchStorageIndex, comp_factory: &'a ComponentFactory, ) -> Self::Item<'a>

Source§

fn merge_prime_arch_key_with( pkey: &mut PrimeArchKey, comp_factory: &ComponentFactory, )

Implementors§