Struct rin::ecs::entity::EntitiesThreadLocal [−][src]
pub struct EntitiesThreadLocal<'a> { /* fields omitted */ }
EntitiesThreadLocal allows to access and modify any entities components.
Implementations
impl<'a> EntitiesThreadLocal<'a>
[src]
impl<'a> EntitiesThreadLocal<'a>
[src]pub fn iter_for<'e, S>(&'e self) -> <S as UnorderedData<'e>>::Iter where
S: UnorderedData<'e> + ReadOnlyOp<'e>,
[src]
S: UnorderedData<'e> + ReadOnlyOp<'e>,
Iterator over all the components that match the operator.
Can only be used for read only operators.
for pos in entities.iter_for::<Read<Position>>(){ }
Will iterate over all the entities that have both position and velocity and update the position by adding the velocity to it. In this example position can be modified cause we use the Write operator but velocity can only be read.
pub fn iter_for_mut<'e, S>(&'e mut self) -> <S as UnorderedData<'e>>::IterMut where
S: UnorderedData<'e>,
[src]
S: UnorderedData<'e>,
Iterator over all the components that match the operator
Can be used with operators that access mutably an storage
for (pos, vel) in entities.iter_for_mut::<(Write<Position>, Read<Velocity>)>(){ pos.x += vel.x; pos.y += vel.y; }
Will iterate over all the entities that have both position and velocity and update the position by adding the velocity to it. In this example position can be modified cause we use the Write operator but velocity can only be read.
pub fn storage_for<'r, S>(&'r self) -> Sto<'r, S> where
S: UnorderedData<'r> + ReadOnlyOp<'r>,
[src]
S: UnorderedData<'r> + ReadOnlyOp<'r>,
Storage for the operator passed as type parameter
Calling iter_for can be slow if it needs to be called lots of times. In those cases
calling instead storage_for
once and then iter() on it multiple times can make performance
much better
let mut storage = entities.storage_for_mut::<(Write<Position>, Read<Velocity>)>().unwrap(); for i in 0..1000000 { for (pos, vel) in storage.iter_mut() { pos.x += vel.x; pos.y += vel.y; } }
pub fn storage_for_mut<'r, S>(&'r mut self) -> Sto<'r, S> where
S: UnorderedData<'r>,
[src]
S: UnorderedData<'r>,
pub fn ordered_iter_for<'e, S>(&'e self) -> <S as OrderedData<'e>>::Iter where
S: OrderedData<'e> + ReadOnlyOrderedOp<'e>,
[src]
S: OrderedData<'e> + ReadOnlyOrderedOp<'e>,
Iterator over ordered data
Similar to iter_for but to be used with operators that specify an order like ReadAndParent in which parents will be processed first and then their children
pub fn ordered_iter_for_mut<'e, S>(&'e mut self) -> <S as OrderedData<'e>>::Iter where
S: OrderedData<'e>,
[src]
S: OrderedData<'e>,
Iterator over ordered data
Similar to iter_for but to be used with operators that specify an order like ReadAndParent in which parents will be processed first and then their children
pub fn ordered_storage_for<'e, S>(
&'e self
) -> Option<<S as OrderedData<'e>>::Storage> where
S: 'a + OrderedData<'e>,
[src]
&'e self
) -> Option<<S as OrderedData<'e>>::Storage> where
S: 'a + OrderedData<'e>,
Storage for the operator passed as type parameter
Calling ordered_iter_for can be slow if it needs to be called lots of times. In those cases
calling instead ordered_storage_for
once and then iter() on it multiple times can make performance
much better
pub fn iter_for_entities<'e, U, E>(
&'e self,
entities: E
) -> <E as IntoEntitiesIterator<'e, <U as UnorderedData<'e>>::Storage>>::IntoEntitiesIter where
E: IntoEntitiesIterator<'e, <U as UnorderedData<'e>>::Storage>,
U: UnorderedData<'e>,
<U as UnorderedData<'e>>::Storage: ReadOnlyStorage,
[src]
&'e self,
entities: E
) -> <E as IntoEntitiesIterator<'e, <U as UnorderedData<'e>>::Storage>>::IntoEntitiesIter where
E: IntoEntitiesIterator<'e, <U as UnorderedData<'e>>::Storage>,
U: UnorderedData<'e>,
<U as UnorderedData<'e>>::Storage: ReadOnlyStorage,
Iterator for the specified operators over a set of entities instead of every entity in the world
It’s usage is similar to iter_for but instead of iterating over all the entities it only returns components that match the operators for the entities passed as parameter
let e1 = world.new_entity() .add(Position{x: 0., y: 0.}) .build(); let e2 = world.new_entity() .add(Position{x: 0., y: 0.}) .build(); let e3 = world.new_entity() .add(Position{x: 0., y: 0.}) .build(); let entities = world.entities(); for pos in entities.iter_for_entities::<Read<Position>, _>(&vec![e1, e2]){ //... }
The operators parameter in this method needs a second type for the entities iterator type which can jsut be elided with a _ since it’ll be guessed from the passed parameter
pub fn iter_for_entities_mut<'e, U, E>(
&'e mut self,
entities: E
) -> <E as IntoEntitiesIterator<'e, <U as UnorderedData<'e>>::Storage>>::IntoEntitiesIterMut where
E: IntoEntitiesIterator<'e, <U as UnorderedData<'e>>::Storage>,
U: UnorderedData<'e>,
[src]
&'e mut self,
entities: E
) -> <E as IntoEntitiesIterator<'e, <U as UnorderedData<'e>>::Storage>>::IntoEntitiesIterMut where
E: IntoEntitiesIterator<'e, <U as UnorderedData<'e>>::Storage>,
U: UnorderedData<'e>,
pub fn iter_for_entities_opt<'e, U, E>(
&'e self,
entities: E
) -> <E as IntoEntitiesIterator<'e, <U as UnorderedData<'e>>::Storage>>::IntoEntitiesOptIter where
E: IntoEntitiesIterator<'e, <U as UnorderedData<'e>>::Storage>,
U: UnorderedData<'e>,
<U as UnorderedData<'e>>::Storage: ReadOnlyStorage,
[src]
&'e self,
entities: E
) -> <E as IntoEntitiesIterator<'e, <U as UnorderedData<'e>>::Storage>>::IntoEntitiesOptIter where
E: IntoEntitiesIterator<'e, <U as UnorderedData<'e>>::Storage>,
U: UnorderedData<'e>,
<U as UnorderedData<'e>>::Storage: ReadOnlyStorage,
pub fn iter_for_entities_opt_mut<'e, U, E>(
&'e mut self,
entities: E
) -> <E as IntoEntitiesIterator<'e, <U as UnorderedData<'e>>::Storage>>::IntoEntitiesOptIterMut where
E: IntoEntitiesIterator<'e, <U as UnorderedData<'e>>::Storage>,
U: UnorderedData<'e>,
[src]
&'e mut self,
entities: E
) -> <E as IntoEntitiesIterator<'e, <U as UnorderedData<'e>>::Storage>>::IntoEntitiesOptIterMut where
E: IntoEntitiesIterator<'e, <U as UnorderedData<'e>>::Storage>,
U: UnorderedData<'e>,
pub unsafe fn unsafe_iter_for_entities_mut<'e, U, E>(
&'e mut self,
entities: E
) -> EntitiesComponentIter<'e, <E as IntoIterator>::IntoIter, <U as UnorderedData<'e>>::Storage> where
E: IntoIterator<Item = Entity>,
U: UnorderedData<'e>,
<U as UnorderedData<'e>>::Storage: StorageRef<'e>,
[src]
&'e mut self,
entities: E
) -> EntitiesComponentIter<'e, <E as IntoIterator>::IntoIter, <U as UnorderedData<'e>>::Storage> where
E: IntoIterator<Item = Entity>,
U: UnorderedData<'e>,
<U as UnorderedData<'e>>::Storage: StorageRef<'e>,
pub fn entity_components<'r, S>(
&'r self,
entity: &Entity
) -> Option<<S as UnorderedData<'r>>::ComponentsRef> where
S: UnorderedData<'r> + ReadOnlyOp<'r> + 'r,
<S as UnorderedData<'r>>::Storage: StorageRef<'r>,
<<S as UnorderedData<'r>>::Storage as StorageRef<'r>>::Component == <S as UnorderedData<'r>>::ComponentsRef,
[src]
&'r self,
entity: &Entity
) -> Option<<S as UnorderedData<'r>>::ComponentsRef> where
S: UnorderedData<'r> + ReadOnlyOp<'r> + 'r,
<S as UnorderedData<'r>>::Storage: StorageRef<'r>,
<<S as UnorderedData<'r>>::Storage as StorageRef<'r>>::Component == <S as UnorderedData<'r>>::ComponentsRef,
Similar to iter_for_entities but for one entity instead of several
let e1 = world.new_entity() .add(Position{x: 0., y: 0.}) .add(Velocity{x: 0., y: 0.}) .build(); let entities = world.entities(); let (pos, vel) = entities .entity_components::<(Read<Position>, Read<Velocity>)>(&e1) .unwrap();
pub fn entity_components_mut<'r, S>(
&'r mut self,
entity: &Entity
) -> Option<<S as UnorderedData<'r>>::ComponentsRef> where
S: UnorderedData<'r> + 'r,
<S as UnorderedData<'r>>::Storage: StorageRef<'r>,
<<S as UnorderedData<'r>>::Storage as StorageRef<'r>>::Component == <S as UnorderedData<'r>>::ComponentsRef,
[src]
&'r mut self,
entity: &Entity
) -> Option<<S as UnorderedData<'r>>::ComponentsRef> where
S: UnorderedData<'r> + 'r,
<S as UnorderedData<'r>>::Storage: StorageRef<'r>,
<<S as UnorderedData<'r>>::Storage as StorageRef<'r>>::Component == <S as UnorderedData<'r>>::ComponentsRef,
pub fn changed_iter_for<'r, S>(
&'r self
) -> EntitiesComponentIter<'r, <S as ChangedData<'r>>::ChangedIter, <S as UnorderedData<'r>>::Storage> where
S: ChangedData<'r> + EntitiesData + ReadOnlyOp<'r> + 'r,
<S as UnorderedData<'r>>::Storage: StorageRef<'r>,
[src]
&'r self
) -> EntitiesComponentIter<'r, <S as ChangedData<'r>>::ChangedIter, <S as UnorderedData<'r>>::Storage> where
S: ChangedData<'r> + EntitiesData + ReadOnlyOp<'r> + 'r,
<S as UnorderedData<'r>>::Storage: StorageRef<'r>,
pub fn changed_iter_for_mut<'r, S>(
&'r mut self
) -> EntitiesComponentIter<'r, <S as ChangedData<'r>>::ChangedIter, <S as UnorderedData<'r>>::Storage> where
S: ChangedData<'r> + EntitiesData + 'r,
<S as UnorderedData<'r>>::Storage: StorageRef<'r>,
[src]
&'r mut self
) -> EntitiesComponentIter<'r, <S as ChangedData<'r>>::ChangedIter, <S as UnorderedData<'r>>::Storage> where
S: ChangedData<'r> + EntitiesData + 'r,
<S as UnorderedData<'r>>::Storage: StorageRef<'r>,
pub fn has_storage_changed<C>(&self) -> bool where
C: ComponentThreadLocal,
<C as Component>::Storage: for<'s> Storage<'s, C>,
<C as Component>::Storage: ChangedStorageExt<'a>,
[src]
C: ComponentThreadLocal,
<C as Component>::Storage: for<'s> Storage<'s, C>,
<C as Component>::Storage: ChangedStorageExt<'a>,
Returns true if a Changed or AutoChanged storage changed during the last run
This will return true if any compoennt was modified (returns true on has_changed) but also if any was inserted or removed from the storage.
To get a correct result this method should only be used after running changes_iter_with for Changed storages or update_changed for AutoChanged storages.
pub fn changes_iter_with<'r, S, F>(&'r mut self, changed: F) where
F: FnMut(<S as UnorderedData<'r>>::ComponentsRef) -> bool,
S: ChangesData<'r> + 'r,
<S as UnorderedData<'r>>::Storage: StorageRef<'r>,
[src]
F: FnMut(<S as UnorderedData<'r>>::ComponentsRef) -> bool,
S: ChangesData<'r> + 'r,
<S as UnorderedData<'r>>::Storage: StorageRef<'r>,
Update Changed storages
This method has to be called once per run to update Changed storages. It receives a function that usually updates the components and returns a boolean indicating if the component changed (true) or not (false).
This is usually faster than AutoChanged storages where the update of the components can happen anywhere but it’s less flexible cause only changes done in this call will be taken into account as changed
pub fn changes_ordered_iter_with<'r, S, F>(&'r mut self, changed: F) where
F: FnMut(<S as OrderedData<'r>>::ComponentsRef) -> bool,
S: ChangesOrderedData<'r> + 'r,
[src]
F: FnMut(<S as OrderedData<'r>>::ComponentsRef) -> bool,
S: ChangesOrderedData<'r> + 'r,
Update Changed storages using an ordered iterator
This method has to be called once per run to update Changed storages. It receives a function that usually updates the components and returns a boolean indicating if the component changed (true) or not (false).
This is usually faster than AutoChanged storages where the update of the components can happen anywhere but it’s less flexible cause only changes done in this call will be taken into account as changed
pub fn update_changed<C>(&self) where
C: ComponentThreadLocal,
<C as Component>::Storage: AutoChangedStorageExt<'a>,
[src]
C: ComponentThreadLocal,
<C as Component>::Storage: AutoChangedStorageExt<'a>,
Update AutoChanged storages
This method has to be called once per run to update AutoChanged storages. It should be run after all the systems that modify the component and before using changed_iter_for on it.
pub fn component_for<C>(&'r self, entity: &Entity) -> Option<Ptr<'r, C>> where
C: Component,
<C as Component>::Storage: for<'s> Storage<'s, C>,
[src]
C: Component,
<C as Component>::Storage: for<'s> Storage<'s, C>,
Returns a component for reading for the passed entity
let e1 = world.new_entity() .add(Position{x: 0., y: 0.}) .build(); let entities = world.entities(); let pos = entities.component_for::<Position>(&e1).unwrap();
pub fn component_for_mut<C>(&'r self, entity: &Entity) -> Option<PtrMut<'r, C>> where
C: Component,
<C as Component>::Storage: for<'s> Storage<'s, C>,
[src]
C: Component,
<C as Component>::Storage: for<'s> Storage<'s, C>,
Returns a component for writing for the passed entity
let e1 = world.new_entity() .add(Position{x: 0., y: 0.}) .build(); let entities = world.entities(); let mut pos = entities.component_for_mut::<Position>(&e1).unwrap();
pub fn has_component<C>(&self, entity: &Entity) -> bool where
C: 'static,
[src]
C: 'static,
Returns true if the entity has the specified component
let e1 = world.new_entity() .add(Position{x: 0., y: 0.}) .build(); let entities = world.entities(); assert!(entities.has_component::<Position>(&e1));
pub fn tree_node_for<C>(&'r self, entity: &Entity) -> Option<NodePtr<'r, C>> where
C: Component,
<C as Component>::Storage: for<'b> HierarchicalStorage<'b, C>,
[src]
C: Component,
<C as Component>::Storage: for<'b> HierarchicalStorage<'b, C>,
Returns the node for a hierarchical component
pub fn tree_node_for_mut<C>(
&'r self,
entity: &Entity
) -> Option<NodePtrMut<'r, C>> where
C: Component,
<C as Component>::Storage: for<'b> HierarchicalStorage<'b, C>,
[src]
&'r self,
entity: &Entity
) -> Option<NodePtrMut<'r, C>> where
C: Component,
<C as Component>::Storage: for<'b> HierarchicalStorage<'b, C>,
Returns the node for a hierarchical component for writing
pub fn to_send(&self) -> &Entities<'a>
[src]
pub fn to_send_mut(&mut self) -> &mut Entities<'a>
[src]
pub fn component_mask<C>(&self) -> U256 where
C: 'static,
[src]
C: 'static,
pub fn clone(&mut self) -> EntitiesThreadLocal<'_>
[src]
pub fn as_storages(&mut self) -> EntityStoragesThreadLocal<'_>
[src]
pub fn split<D>(&mut self) -> (EntitiesThreadLocal<'_>, EntitiesThreadLocal<'_>) where
D: DataAccesses,
[src]
D: DataAccesses,
Trait Implementations
impl<'a> EntitiesExt<'a> for EntitiesThreadLocal<'a>
[src]
impl<'a> EntitiesExt<'a> for EntitiesThreadLocal<'a>
[src]pub fn iter_for<'e, S>(&'e self) -> <S as UnorderedData<'e>>::Iter where
S: UnorderedDataSend<'e> + ReadOnlyOp<'e>,
[src]
S: UnorderedDataSend<'e> + ReadOnlyOp<'e>,
pub fn iter_for_mut<'e, S>(&'e mut self) -> <S as UnorderedData<'e>>::IterMut where
S: UnorderedDataSend<'e>,
[src]
S: UnorderedDataSend<'e>,
pub fn ordered_iter_for<'e, S>(&'e self) -> <S as OrderedData<'e>>::Iter where
S: OrderedDataSend<'e> + ReadOnlyOrderedOp<'e>,
[src]
S: OrderedDataSend<'e> + ReadOnlyOrderedOp<'e>,
pub fn ordered_iter_for_mut<'e, S>(&'e mut self) -> <S as OrderedData<'e>>::Iter where
S: OrderedDataSend<'e>,
[src]
S: OrderedDataSend<'e>,
pub fn changed_iter_for<'r, S>(
&'r self
) -> EntitiesComponentIter<'r, <S as ChangedData<'r>>::ChangedIter, <S as UnorderedData<'r>>::Storage> where
S: ChangedDataSend<'r> + EntitiesData + ReadOnlyOp<'r> + 'r,
<S as UnorderedData<'r>>::Storage: StorageRef<'r>,
[src]
&'r self
) -> EntitiesComponentIter<'r, <S as ChangedData<'r>>::ChangedIter, <S as UnorderedData<'r>>::Storage> where
S: ChangedDataSend<'r> + EntitiesData + ReadOnlyOp<'r> + 'r,
<S as UnorderedData<'r>>::Storage: StorageRef<'r>,
pub fn changed_iter_for_mut<'r, S>(
&'r mut self
) -> EntitiesComponentIter<'r, <S as ChangedData<'r>>::ChangedIter, <S as UnorderedData<'r>>::Storage> where
S: ChangedDataSend<'r> + EntitiesData + 'r,
<S as UnorderedData<'r>>::Storage: StorageRef<'r>,
[src]
&'r mut self
) -> EntitiesComponentIter<'r, <S as ChangedData<'r>>::ChangedIter, <S as UnorderedData<'r>>::Storage> where
S: ChangedDataSend<'r> + EntitiesData + 'r,
<S as UnorderedData<'r>>::Storage: StorageRef<'r>,
pub fn iter_for_entities<'e, U, E>(
&'e self,
entities: E
) -> <E as IntoEntitiesIterator<'e, <U as UnorderedData<'e>>::Storage>>::IntoEntitiesIter where
E: IntoEntitiesIterator<'e, <U as UnorderedData<'e>>::Storage>,
U: UnorderedDataSend<'e>,
<U as UnorderedData<'e>>::Storage: ReadOnlyStorage,
[src]
&'e self,
entities: E
) -> <E as IntoEntitiesIterator<'e, <U as UnorderedData<'e>>::Storage>>::IntoEntitiesIter where
E: IntoEntitiesIterator<'e, <U as UnorderedData<'e>>::Storage>,
U: UnorderedDataSend<'e>,
<U as UnorderedData<'e>>::Storage: ReadOnlyStorage,
pub fn iter_for_entities_mut<'e, U, E>(
&'e mut self,
entities: E
) -> <E as IntoEntitiesIterator<'e, <U as UnorderedData<'e>>::Storage>>::IntoEntitiesIterMut where
E: IntoEntitiesIterator<'e, <U as UnorderedData<'e>>::Storage>,
U: UnorderedDataSend<'e>,
[src]
&'e mut self,
entities: E
) -> <E as IntoEntitiesIterator<'e, <U as UnorderedData<'e>>::Storage>>::IntoEntitiesIterMut where
E: IntoEntitiesIterator<'e, <U as UnorderedData<'e>>::Storage>,
U: UnorderedDataSend<'e>,
pub fn iter_for_entities_opt<'e, U, E>(
&'e self,
entities: E
) -> <E as IntoEntitiesIterator<'e, <U as UnorderedData<'e>>::Storage>>::IntoEntitiesOptIter where
E: IntoEntitiesIterator<'e, <U as UnorderedData<'e>>::Storage>,
U: UnorderedDataSend<'e>,
<U as UnorderedData<'e>>::Storage: ReadOnlyStorage,
[src]
&'e self,
entities: E
) -> <E as IntoEntitiesIterator<'e, <U as UnorderedData<'e>>::Storage>>::IntoEntitiesOptIter where
E: IntoEntitiesIterator<'e, <U as UnorderedData<'e>>::Storage>,
U: UnorderedDataSend<'e>,
<U as UnorderedData<'e>>::Storage: ReadOnlyStorage,
pub fn iter_for_entities_opt_mut<'e, U, E>(
&'e mut self,
entities: E
) -> <E as IntoEntitiesIterator<'e, <U as UnorderedData<'e>>::Storage>>::IntoEntitiesOptIterMut where
E: IntoEntitiesIterator<'e, <U as UnorderedData<'e>>::Storage>,
U: UnorderedDataSend<'e>,
[src]
&'e mut self,
entities: E
) -> <E as IntoEntitiesIterator<'e, <U as UnorderedData<'e>>::Storage>>::IntoEntitiesOptIterMut where
E: IntoEntitiesIterator<'e, <U as UnorderedData<'e>>::Storage>,
U: UnorderedDataSend<'e>,
pub fn entity_components<'r, S>(
&'r self,
entity: &Entity
) -> Option<<S as UnorderedData<'r>>::ComponentsRef> where
S: UnorderedDataSend<'r> + ReadOnlyOp<'r> + 'r,
<S as UnorderedData<'r>>::Storage: StorageRef<'r>,
<<S as UnorderedData<'r>>::Storage as StorageRef<'r>>::Component == <S as UnorderedData<'r>>::ComponentsRef,
[src]
&'r self,
entity: &Entity
) -> Option<<S as UnorderedData<'r>>::ComponentsRef> where
S: UnorderedDataSend<'r> + ReadOnlyOp<'r> + 'r,
<S as UnorderedData<'r>>::Storage: StorageRef<'r>,
<<S as UnorderedData<'r>>::Storage as StorageRef<'r>>::Component == <S as UnorderedData<'r>>::ComponentsRef,
pub fn entity_components_mut<'r, S>(
&'r mut self,
entity: &Entity
) -> Option<<S as UnorderedData<'r>>::ComponentsRef> where
S: UnorderedDataSend<'r> + 'r,
<S as UnorderedData<'r>>::Storage: StorageRef<'r>,
<<S as UnorderedData<'r>>::Storage as StorageRef<'r>>::Component == <S as UnorderedData<'r>>::ComponentsRef,
[src]
&'r mut self,
entity: &Entity
) -> Option<<S as UnorderedData<'r>>::ComponentsRef> where
S: UnorderedDataSend<'r> + 'r,
<S as UnorderedData<'r>>::Storage: StorageRef<'r>,
<<S as UnorderedData<'r>>::Storage as StorageRef<'r>>::Component == <S as UnorderedData<'r>>::ComponentsRef,
pub fn component_for<C>(&self, entity: &Entity) -> Option<Ptr<'_, C>> where
C: ComponentSend,
<C as Component>::Storage: for<'s> Storage<'s, C>,
[src]
C: ComponentSend,
<C as Component>::Storage: for<'s> Storage<'s, C>,
pub fn component_for_mut<C>(&self, entity: &Entity) -> Option<PtrMut<'_, C>> where
C: ComponentSend,
<C as Component>::Storage: for<'s> Storage<'s, C>,
[src]
C: ComponentSend,
<C as Component>::Storage: for<'s> Storage<'s, C>,
pub fn has_component<C>(&self, entity: &Entity) -> bool where
C: 'static,
[src]
C: 'static,
pub fn tree_node_for<C>(&self, entity: &Entity) -> Option<NodePtr<'_, C>> where
C: ComponentSend,
<C as Component>::Storage: for<'b> HierarchicalStorage<'b, C>,
[src]
C: ComponentSend,
<C as Component>::Storage: for<'b> HierarchicalStorage<'b, C>,
pub fn tree_node_for_mut<C>(&self, entity: &Entity) -> Option<NodePtrMut<'_, C>> where
C: ComponentSend,
<C as Component>::Storage: for<'b> HierarchicalStorage<'b, C>,
[src]
C: ComponentSend,
<C as Component>::Storage: for<'b> HierarchicalStorage<'b, C>,
pub fn storage_for<'r, S>(&'r self) -> Sto<'r, S> where
S: UnorderedDataSend<'r> + ReadOnlyOp<'r>,
[src]
S: UnorderedDataSend<'r> + ReadOnlyOp<'r>,
pub fn storage_for_mut<'r, S>(&'r mut self) -> Sto<'r, S> where
S: UnorderedDataSend<'r>,
[src]
S: UnorderedDataSend<'r>,
impl<'a> EntitiesStorage for EntitiesThreadLocal<'a>
[src]
impl<'a> EntitiesStorage for EntitiesThreadLocal<'a>
[src]pub fn storage<C>(&self) -> Option<ReadGuardRef<'_, <C as Component>::Storage>> where
C: Component,
[src]
C: Component,
pub fn storage_mut<C>(
&self
) -> Option<WriteGuardRef<'_, <C as Component>::Storage, <C as Component>::MutStorageCacheGuard>> where
C: Component,
[src]
&self
) -> Option<WriteGuardRef<'_, <C as Component>::Storage, <C as Component>::MutStorageCacheGuard>> where
C: Component,
pub fn entities_ref(&self) -> &[(Entity, U256)]ⓘ
[src]
pub fn component_mask<C>(&self) -> U256 where
C: 'static,
[src]
C: 'static,
pub fn entities_for_mask<S>(
&self,
query_mask: Bitmask,
storage: &S
) -> IndexGuard<'_> where
S: FastIndexExt,
[src]
&self,
query_mask: Bitmask,
storage: &S
) -> IndexGuard<'_> where
S: FastIndexExt,
pub fn lazy_entities_for_mask(&self, query_mask: Bitmask) -> LazyIndexGuard<'_>
[src]
pub fn ordered_entities_for<C, S>(
&self,
query_mask: Bitmask,
unordered_storage: &S
) -> OrderedIndexGuard<'_> where
C: Component,
S: FastIndexExt,
<C as Component>::Storage: for<'b> HierarchicalStorage<'b, C>,
[src]
&self,
query_mask: Bitmask,
unordered_storage: &S
) -> OrderedIndexGuard<'_> where
C: Component,
S: FastIndexExt,
<C as Component>::Storage: for<'b> HierarchicalStorage<'b, C>,
Auto Trait Implementations
impl<'a> !RefUnwindSafe for EntitiesThreadLocal<'a>
impl<'a> !Send for EntitiesThreadLocal<'a>
impl<'a> !Sync for EntitiesThreadLocal<'a>
impl<'a> Unpin for EntitiesThreadLocal<'a>
impl<'a> !UnwindSafe for EntitiesThreadLocal<'a>
Blanket Implementations
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]pub fn to_subset(&self) -> Option<SS>
[src]
pub fn is_in_subset(&self) -> bool
[src]
pub fn to_subset_unchecked(&self) -> SS
[src]
pub fn from_subset(element: &SS) -> SP
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]