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
Required methods
fn into_components(self) -> Self::Data
fn into_components(self) -> Self::Data
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.