Trait legion::query::Fetch[][src]

pub trait Fetch: IntoIndexableIter + Send + Sync {
    type Data;
    fn into_components(self) -> Self::Data;
fn find<T: 'static>(&self) -> Option<&[T]>;
fn find_mut<T: 'static>(&mut self) -> Option<&mut [T]>;
fn version<T: Component>(&self) -> Option<u64>;
fn accepted(&mut self); }
Expand description

A type which holds onto a slice of entity data retrieved from a single archetype.

Associated Types

The inner data representation fetched from the archetype. Typically a slice reference.

Required methods

Converts the fetch into the retrieved component slices

Tries to find a slice of components, if this fetch contains the requested component type.

Tries to find a mutable slice of components, if this fetch contains the requested component type.

Tries to find the component slice version of a component, if this fetch contains the requested component type.

Indicates that the archetype is going to be provided to the user. Component slice versions are incremented here.

Implementors