pub trait IsQuery {
    type LockedColumns<'a>;
    type ExtensionColumns: 'static;
    type QueryResult<'a>: Iterator<Item = Self::QueryRow<'a>>;
    type ParQueryResult<'a>: ParallelIterator<Item = Self::QueryRow<'a>> + IndexedParallelIterator;
    type QueryRow<'a>: Send + Sync;

    fn borrows() -> Vec<Borrow>;
    fn lock_columns<'a>(arch: &'a Archetype) -> Self::LockedColumns<'a>;
    fn extend_locked_columns<'a, 'b>(
        lock: &'b mut Self::LockedColumns<'a>,
        extension_columns: Self::ExtensionColumns,
        output_ids: Option<(&mut Vec<usize>, &mut usize)>
    ); fn iter_mut<'a, 'b>(
        lock: &'b mut Self::LockedColumns<'a>
    ) -> Self::QueryResult<'b>; fn iter_one<'a, 'b>(
        lock: &'b mut Self::LockedColumns<'a>,
        index: usize
    ) -> Self::QueryResult<'b>; fn par_iter_mut<'a, 'b>(
        len: usize,
        lock: &'b mut Self::LockedColumns<'a>
    ) -> Self::ParQueryResult<'b>; }
Expand description

Denotes the shape of a query that can be used to iterate over bundles of components.

Required Associated Types

Data that is read or write locked by performing this query.

Data that can be used to append to columns. Typically vectors of component entries or bundles of vectors of component entries.

The iterator that is produced by performing a query on one archetype.

The parallel iterator that is produced by performing a query on one archetype.

The iterator item.

Required Methods

Find and acquire a “lock” on the columns for reading or writing.

Extend entries in the locked columns.

This is for internal use only.

Create an iterator over the rows of the given columns.

Create an iterator over one row with the given index.

Create an iterator over the rows of the given columns.

Implementations on Foreign Types

Create an iterator over the rows of the given columns.

Create an iterator over the rows of the given columns.

Implementors