Struct rinecs::World [−][src]
pub struct World { /* fields omitted */ }
Main rinecs object that contains all entities, resources and systems.
A world is the first object one creates when using rinecs.
Through it one can create every other element, like entities and their components.
Also resources, globbally accessible data, is stored in the world and passed later to the systems.
The systems order of exectuion is defined by adding systems to the world and using barriers to define groups of parallel execution.
Once the world is setup one can call run_once or the more specific run_multi_threaded and run_single_threaded to run the systems in the order they were added.
Implementations
impl World
[src]
impl World
[src]pub fn new() -> World
[src]
pub fn register_with_capacity<'r, C: ComponentSend>(&mut self, capacity: usize) where
<C as Component>::Storage: Storage<'s, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
[src]
<C as Component>::Storage: Storage<'s, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
Registers a type that implements Send
as Component
reserving an initial amount of memory.
Send
components can be used from System
which run from different threads.
Calling this method is not needed but will make initial insertion faster if we can estimate the total amount of components beforehand
pub fn register_thread_local_with_capacity<'r, C: ComponentSend>(
&mut self,
capacity: usize
) where
<C as Component>::Storage: Storage<'s, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
[src]
&mut self,
capacity: usize
) where
<C as Component>::Storage: Storage<'s, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
Registers a type that can only be used from the main thread asComponent
reserving an
initial amount of memory.
Send
components can be used from System
which run from different threads.
Calling this method is not needed but will make initial insertion faster if we can estimate the total amount of components beforehand
pub fn new_entity(&mut self) -> EntityBuilder<'_>
[src]
Returns an EntityBuilder that allows to create an entity and it’s components.
let e = world.new_entity() .add(Position{x: 0., y: 0.}) .add(Velocity{x: 0., y: 0.}) .build();
pub fn component_mask<C: 'static>(&self) -> MaskType
[src]
pub fn entities(&mut self) -> Entities<'_>
[src]
Returns an Entities
object that allows to iterate over all the Send
components
of entities in this world.
pub fn entities_thread_local(&mut self) -> EntitiesThreadLocal<'_>
[src]
Returns an EntitiesThreadLocal
object that allows to iterate over all the
Send
and non Send
components of entities in this world.
pub fn entities_creation(&mut self) -> EntitiesCreation<'_>
[src]
Returns an EntitiesCreation
object that allows to iterate over all the
Send
and non Send
components of entities in this world and create
new entities and resources.
pub fn debug_entities(&mut self) -> EntitiesDebug<'_>
[src]
Returns an EntitiesDebug
object that allows to iterate over all the
Send
and non Send
components of entities in this world and debug / serialize
them
pub fn add_component_to<'r, C: ComponentSend>(
&mut self,
entity: &Entity,
component: C
) where
<C as Component>::Storage: Storage<'s, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
[src]
&mut self,
entity: &Entity,
component: C
) where
<C as Component>::Storage: Storage<'s, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
Adds a Send
Component
to an already existing Entity
.
pub fn add_component_to_thread_local<'r, C: ComponentThreadLocal>(
&mut self,
entity: &Entity,
component: C
) where
<C as Component>::Storage: Storage<'s, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
[src]
&mut self,
entity: &Entity,
component: C
) where
<C as Component>::Storage: Storage<'s, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
Adds a non Send
Component
to an already existing Entity
.
pub fn add_tag_to<C: 'static>(&mut self, entity: &Entity)
[src]
pub fn add_child_component_to<'r, C: ComponentSend>(
&mut self,
parent: &Entity,
entity: &Entity,
component: C
) where
<C as Component>::Storage: HierarchicalStorage<'b, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
[src]
&mut self,
parent: &Entity,
entity: &Entity,
component: C
) where
<C as Component>::Storage: HierarchicalStorage<'b, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
Adds a Send
Component
to an already existing Entity
.
pub fn add_child_component_to_thread_local<'r, C: ComponentThreadLocal>(
&mut self,
parent: &Entity,
entity: &Entity,
component: C
) where
<C as Component>::Storage: HierarchicalStorage<'b, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
[src]
&mut self,
parent: &Entity,
entity: &Entity,
component: C
) where
<C as Component>::Storage: HierarchicalStorage<'b, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
Adds a non Send
Component
to an already existing Entity
.
pub fn add_slice_component_to<'r, C, I>(
&mut self,
entity: &Entity,
component: I
) where
C: OneToNComponentSend,
<C as Component>::Storage: OneToNStorage<'s, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
I: IntoIterator<Item = C>,
[src]
&mut self,
entity: &Entity,
component: I
) where
C: OneToNComponentSend,
<C as Component>::Storage: OneToNStorage<'s, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
I: IntoIterator<Item = C>,
Adds a Send
OneToNComponent
to an already existing Entity
.
This allows to add a slice of components to an entity instead of only one component. This components are stored contiguously in memory for all the entities.
pub fn add_slice_component_to_thread_local<'r, C, I>(
&mut self,
entity: &Entity,
component: I
) where
C: OneToNComponentThreadLocal,
<C as Component>::Storage: OneToNStorage<'s, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
I: IntoIterator<Item = C>,
[src]
&mut self,
entity: &Entity,
component: I
) where
C: OneToNComponentThreadLocal,
<C as Component>::Storage: OneToNStorage<'s, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
I: IntoIterator<Item = C>,
Adds a non Send
OneToNComponent
to an already existing Entity
.
This allows to add a slice of components to an entity instead of only one component. This components are stored contiguously in memory for all the entities.
pub fn remove_component_from<'r, C: Component>(&mut self, entity: &Entity) where
<C as Component>::Storage: Storage<'s, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
[src]
<C as Component>::Storage: Storage<'s, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
Removes a compoenent of the specified type from an entity.
pub fn remove_entity(&mut self, entity: &Entity)
[src]
Removes an Entity
and all it’s compoenents.
pub fn add_resource<T: 'static + Send>(&mut self, resource: T)
[src]
Adds a Send
resource to the world.
Resources are globally accesible by any system through
the Resources
object passed as parameter to them.
pub fn add_resource_as_trait<T, U: ?Sized, F, FMut>(
&mut self,
resource: (T, F, FMut)
) where
T: 'static + Send,
U: 'static + Send,
F: Fn(&T) -> &U + 'static,
FMut: Fn(&mut T) -> &mut U + 'static,
[src]
&mut self,
resource: (T, F, FMut)
) where
T: 'static + Send,
U: 'static + Send,
F: Fn(&T) -> &U + 'static,
FMut: Fn(&mut T) -> &mut U + 'static,
Adds a Send
resource to the world accessible as a &dyn Trait.
Resources are globally accesible by any system through
the Resources
object passed as parameter to them.
pub fn resources(&self) -> Resources<'_>
[src]
Returns a Resources
object that allows to access all the
Send
resources in the world.
pub fn entities_and_resources(&mut self) -> (Entities<'_>, Resources<'_>)
[src]
pub fn remove_resource<T: 'static>(&mut self) -> Option<T>
[src]
Removes a resource of the specified type.
pub fn add_resource_thread_local<T: 'static>(&mut self, resource: T)
[src]
Adds a non Send
resource to the world.
Non Send
resources are globally accesible by any SystemThreadLocal
through the ResourcesThreadLocal
object passed as parameter to them.
pub fn add_resource_as_trait_thread_local<T, U: ?Sized, F, FMut>(
&mut self,
resource: (T, F, FMut)
) where
T: 'static,
U: 'static,
F: Fn(&T) -> &U + 'static,
FMut: Fn(&mut T) -> &mut U + 'static,
[src]
&mut self,
resource: (T, F, FMut)
) where
T: 'static,
U: 'static,
F: Fn(&T) -> &U + 'static,
FMut: Fn(&mut T) -> &mut U + 'static,
Adds a non Send
resource to the world accessible as a &dyn Trait.
Non Send
resources are are globally accesible by any system through
the Resources
object passed as parameter to them.
pub fn resource<T: 'static>(&self) -> Option<ReadGuardRef<'_, T>>
[src]
Returns a resource of the specified type if it exists for reading.
pub fn resource_as<T: 'static + ?Sized>(&self) -> Option<ReadGuardRef<'_, T>>
[src]
Returns a resource of the specified type if it exists for reading.
pub fn resource_mut<T: 'static>(&self) -> Option<WriteGuardRef<'_, T>>
[src]
Returns a resource of the specified type if it exists for writing.
pub fn resources_thread_local(&self) -> ResourcesThreadLocal<'_>
[src]
Returns a ResourcesThreadLocal
object that allows to access all the
resources in the world.
pub fn entities_and_resources_thread_local(
&mut self
) -> (EntitiesThreadLocal<'_>, ResourcesThreadLocal<'_>)
[src]
&mut self
) -> (EntitiesThreadLocal<'_>, ResourcesThreadLocal<'_>)
pub fn resources_creation(&mut self) -> ResourcesCreation<'_>
[src]
Returns a Resources
object that allows to access all the
Send
and non Send
resources in the world and also allows to create new resources
and delete them.
pub fn entities_and_resources_creation(
&mut self
) -> (EntitiesCreation<'_>, ResourcesCreation<'_>)
[src]
&mut self
) -> (EntitiesCreation<'_>, ResourcesCreation<'_>)
pub fn add_system<S>(&mut self, system: S) -> &mut World where
S: System + 'static,
[src]
S: System + 'static,
Adds a Send
System
that will be run in the order it was added.
Send
systems will run in parallel with other Send
systems and
with thread local systems added in between barriers.
pub fn add_system_once<S>(&mut self, system: S) -> &mut World where
S: SystemOnce + 'static,
[src]
S: SystemOnce + 'static,
Adds a Send
System
that will be run in the order it was added.
Send
systems will run in parallel with other Send
systems and
with thread local systems added in between barriers.
pub fn add_system_with_data<S, D>(&mut self, system: S, data: D) -> &mut World where
S: FnMut(&mut D, Entities<'_>, Resources<'_>) + Send + 'static,
D: Send + 'static,
[src]
S: FnMut(&mut D, Entities<'_>, Resources<'_>) + Send + 'static,
D: Send + 'static,
Adds a Send
System
that will be run in the order it was added
and data that will be passed to the system as first parameter.
Send
systems will run in parallel with other Send
systems and
with thread local systems added in between barriers.
pub fn add_system_thread_local<S>(&mut self, system: S) -> &mut World where
S: SystemThreadLocal + 'static,
[src]
S: SystemThreadLocal + 'static,
Adds a non Send
System
that will be run in the order it was added.
SystemThreadLocal will always run in the main thread but can run in parallel
with Send
systems.
pub fn add_system_once_thread_local<S>(&mut self, system: S) -> &mut World where
S: SystemOnceThreadLocal + 'static,
[src]
S: SystemOnceThreadLocal + 'static,
Adds a non Send
System
that will be run only once
SystemOnceThreadLocal will run in the main thread but can run in parallel
with Send
systems.
pub fn add_system_thread_local_with_data<S, D>(
&mut self,
system: S,
data: D
) -> &mut World where
S: FnMut(&mut D, EntitiesThreadLocal<'_>, ResourcesThreadLocal<'_>) + 'static,
D: 'static,
[src]
&mut self,
system: S,
data: D
) -> &mut World where
S: FnMut(&mut D, EntitiesThreadLocal<'_>, ResourcesThreadLocal<'_>) + 'static,
D: 'static,
Adds a non Send
System
that will be run in the order it was added
and data that will be passed to the system as first parameter.
SystemThreadLocal will always run in the main thread but can run in parallel
with Send
systems.
pub fn add_creation_system<S>(&mut self, system: S) -> &mut World where
S: CreationSystem + 'static,
[src]
S: CreationSystem + 'static,
Adds a CreationSystem
that will be run in the order it was added.
CreationSystems run alone with no other system running in parallel.
pub fn add_creation_system_once<S>(&mut self, system: S) -> &mut World where
S: CreationSystemOnce + 'static,
[src]
S: CreationSystemOnce + 'static,
Adds a CreationSystemOnce
CreationSystemsOnce run once and alone with no other system running in parallel.
pub fn add_creation_system_with_data<S, D>(
&mut self,
system: S,
data: D
) -> &mut World where
S: FnMut(&mut D, EntitiesCreation<'_>, ResourcesCreation<'_>) + 'static,
D: 'static,
[src]
&mut self,
system: S,
data: D
) -> &mut World where
S: FnMut(&mut D, EntitiesCreation<'_>, ResourcesCreation<'_>) + 'static,
D: 'static,
Adds a CreationSystem
that will be run in the order it was added
and data that will be passed to the system as first parameter.
CreationSystems run alone with no other system running in parallel.
pub fn add_system_with<S>(&mut self, system: S) -> Builder<'_, '_, S> where
S: System + 'static,
[src]
S: System + 'static,
Adds a Send
System
that will be run in the order it was added using a Builder that
allows to set some system settings like the name it’ll show up with in stats or the conditions
under it will run.
The settings set using the builder will override those that system sets itself through attributes or implementation.
Send
systems will run in parallel with other Send
systems and
with thread local systems added in between barriers.
pub fn add_system_once_with<S>(&mut self, system: S) -> BuilderOnce<'_, '_, S> where
S: SystemOnce + 'static,
[src]
S: SystemOnce + 'static,
Adds a Send
SystemOnce
that will be run only once using a Builder that
allows to set some system settings like the name it’ll show up with in stats or the conditions
under it will run.
The settings set using the builder will override those that system sets itself through attributes or implementation.
Send
systems will run in parallel with other Send
systems and
with thread local systems added in between barriers.
pub fn add_system_thread_local_with<S>(
&mut self,
system: S
) -> BuilderThreadLocal<'_, '_, S> where
S: SystemThreadLocal + 'static,
[src]
&mut self,
system: S
) -> BuilderThreadLocal<'_, '_, S> where
S: SystemThreadLocal + 'static,
Adds a thread local System
using a Builder that
allows to set some system settings like the name it’ll show up with in stats or the conditions
under it will run.
The settings set using the builder will override those that system sets itself through attributes or implementation.
SystemThreadLocal will always run in the main thread but can run in parallel
with Send
systems.
pub fn add_system_once_thread_local_with<S>(
&mut self,
system: S
) -> BuilderOnceThreadLocal<'_, '_, S> where
S: SystemOnceThreadLocal + 'static,
[src]
&mut self,
system: S
) -> BuilderOnceThreadLocal<'_, '_, S> where
S: SystemOnceThreadLocal + 'static,
Adds a thread local System
that will be run only once using a Builder that
allows to set some system settings like the name it’ll show up with in stats or the conditions
under it will run.
The settings set using the builder will override those that system sets itself through attributes or implementation.
SystemThreadLocal will always run in the main thread but can run in parallel
with Send
systems.
pub fn add_creation_system_with<S>(
&mut self,
system: S
) -> BuilderCreation<'_, '_, S> where
S: CreationSystem + 'static,
[src]
&mut self,
system: S
) -> BuilderCreation<'_, '_, S> where
S: CreationSystem + 'static,
Adds a creation System
using a Builder that
allows to set some system settings like the name it’ll show up with in stats or the conditions
under it will run.
The settings set using the builder will override those that system sets itself through attributes or implementation.
CreationSystems run alone with no other system running in parallel.
pub fn add_creation_system_once_with<S>(
&mut self,
system: S
) -> BuilderCreationOnce<'_, '_, S> where
S: CreationSystemOnce + 'static,
[src]
&mut self,
system: S
) -> BuilderCreationOnce<'_, '_, S> where
S: CreationSystemOnce + 'static,
Adds a creation System
that will be run only once using a Builder that
allows to set some system settings like the name it’ll show up with in stats or the conditions
under it will run.
The settings set using the builder will override those that system sets itself through attributes or implementation.
CreationSystems run alone with no other system running in parallel.
pub fn add_debug_system<S>(&mut self, system: S) -> &mut World where
S: SystemDebug + 'static,
[src]
S: SystemDebug + 'static,
Adds a SystemDebug
SystemDebug run alone with no other system running in parallel.
pub fn add_barrier<B: Barrier + 'static>(&mut self) -> &mut World
[src]
Delimits all the systems that will run in parallel.
Only systems between barriers (or creation and debug systems) will run in parallel with each other.
Barriers allow to create groups of systems that run in parallel
including thread local systems that run one by one in the main
thread but in parallel with Send
systems.
pub fn render_systems_dependency_graph<P: AsRef<Path>>(&mut self, file: P)
[src]
pub fn run_once(&mut self)
[src]
Runs all the systems in the world once.
If the parallel_systems
features
are enabled the systems will al be run in the main thread sequentially
but without monitoring for parallelism conflicts.
If parallel_systems
is enabled it’ll run Send
and thread local systems
in parallel, running thread local systems always from the main thread.
Creation and Debug systems act as a barrier and run alone.
pub fn run_multi_threaded(&mut self)
[src]
Only available when the default parallel_systems
feature is enabled
it’ll run Send
and thread local systems in parallel, running thread local
systems always from the main thread. Creation and Debug systems act as a
barrier and run alone.
pub fn run_single_threaded(&mut self)
[src]
It runs all he systems in the world in the main thread sequentially
pub fn is_registered<C: Component>(&self) -> bool
[src]
pub fn creation_storage<C: Component>(&mut self) -> CreationSto<'_, C>
[src]
pub fn component_for<C: Component>(&self, entity: &Entity) -> Option<Ptr<'_, C>> where
<C as Component>::Storage: Storage<'s, C>,
[src]
<C as Component>::Storage: Storage<'s, C>,
pub fn component_for_mut<C: Component>(
&self,
entity: &Entity
) -> Option<PtrMut<'_, C>> where
<C as Component>::Storage: Storage<'s, C>,
[src]
&self,
entity: &Entity
) -> Option<PtrMut<'_, C>> where
<C as Component>::Storage: Storage<'s, C>,
pub fn storage_for<'r, S>(&'r self) -> Sto<'r, S> where
S: UnorderedData<'r> + ReadOnlyOp<'r>,
[src]
S: UnorderedData<'r> + ReadOnlyOp<'r>,
pub fn storage_for_mut<'r, S>(&'r mut self) -> Sto<'r, S> where
S: UnorderedData<'r>,
[src]
S: UnorderedData<'r>,
Trait Implementations
impl<'a> CreationContextExt<'a> for World
[src]
impl<'a> CreationContextExt<'a> for World
[src]fn with_entities_and_resources_creation<'e, F, R>(&'e mut self, f: F) -> R where
F: FnOnce(EntitiesCreation<'e>, ResourcesCreation<'e>) -> R,
[src]
F: FnOnce(EntitiesCreation<'e>, ResourcesCreation<'e>) -> R,
impl<'a> EntitiesCreationExt<'a> for World
[src]
impl<'a> EntitiesCreationExt<'a> for World
[src]fn with_entities_creation<'e, F, R>(&'e mut self, f: F) -> R where
F: FnOnce(EntitiesCreation<'e>) -> R,
[src]
F: FnOnce(EntitiesCreation<'e>) -> R,
fn new_entity(&mut self) -> EntityBuilder<'_>
[src]
fn creation_storage<C: Component>(&mut self) -> CreationSto<'_, C>
[src]
fn add_component_to<'r, C: ComponentSend>(
&mut self,
entity: &Entity,
component: C
) where
<C as Component>::Storage: Storage<'s, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
[src]
&mut self,
entity: &Entity,
component: C
) where
<C as Component>::Storage: Storage<'s, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
fn add_component_to_thread_local<'r, C: ComponentThreadLocal>(
&mut self,
entity: &Entity,
component: C
) where
<C as Component>::Storage: Storage<'s, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
[src]
&mut self,
entity: &Entity,
component: C
) where
<C as Component>::Storage: Storage<'s, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
fn add_tag_to<C: 'static>(&mut self, entity: &Entity)
[src]
fn add_child_component_to<'r, C: ComponentSend>(
&mut self,
parent: &Entity,
entity: &Entity,
component: C
) where
<C as Component>::Storage: HierarchicalStorage<'b, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
[src]
&mut self,
parent: &Entity,
entity: &Entity,
component: C
) where
<C as Component>::Storage: HierarchicalStorage<'b, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
fn add_child_component_to_thread_local<'r, C: ComponentThreadLocal>(
&mut self,
parent: &Entity,
entity: &Entity,
component: C
) where
<C as Component>::Storage: HierarchicalStorage<'b, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
[src]
&mut self,
parent: &Entity,
entity: &Entity,
component: C
) where
<C as Component>::Storage: HierarchicalStorage<'b, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
fn add_slice_component_to<'r, C, I>(&mut self, entity: &Entity, component: I) where
C: OneToNComponentSend,
<C as Component>::Storage: OneToNStorage<'s, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
I: IntoIterator<Item = C>,
[src]
C: OneToNComponentSend,
<C as Component>::Storage: OneToNStorage<'s, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
I: IntoIterator<Item = C>,
fn add_slice_component_to_thread_local<'r, C, I>(
&mut self,
entity: &Entity,
component: I
) where
C: OneToNComponentThreadLocal,
<C as Component>::Storage: OneToNStorage<'s, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
I: IntoIterator<Item = C>,
[src]
&mut self,
entity: &Entity,
component: I
) where
C: OneToNComponentThreadLocal,
<C as Component>::Storage: OneToNStorage<'s, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
I: IntoIterator<Item = C>,
fn remove_component_from<'r, C: Component>(&mut self, entity: &Entity) where
<C as Component>::Storage: Storage<'s, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
[src]
<C as Component>::Storage: Storage<'s, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
fn remove_entity(&mut self, entity: &Entity)
[src]
impl<'a> EntitiesExt<'a> for World
[src]
impl<'a> EntitiesExt<'a> for World
[src]fn iter_for<'e, S: UnorderedDataSend<'e> + ReadOnlyOp<'e>>(
&'e self
) -> <S as UnorderedData<'e>>::Iter
[src]
&'e self
) -> <S as UnorderedData<'e>>::Iter
fn iter_for_mut<'e, S: UnorderedDataSend<'e>>(
&'e mut self
) -> <S as UnorderedData<'e>>::IterMut
[src]
&'e mut self
) -> <S as UnorderedData<'e>>::IterMut
fn ordered_iter_for<'e, S: OrderedDataSend<'e> + ReadOnlyOrderedOp<'e>>(
&'e self
) -> <S as OrderedData<'e>>::Iter
[src]
&'e self
) -> <S as OrderedData<'e>>::Iter
fn ordered_iter_for_mut<'e, S: OrderedDataSend<'e>>(
&'e mut self
) -> <S as OrderedData<'e>>::Iter
[src]
&'e mut self
) -> <S as OrderedData<'e>>::Iter
fn iter_for_entities<'e, U, E>(&'e self, entities: E) -> E::IntoEntitiesIter where
E: IntoEntitiesIterator<'e, U::Storage>,
U: UnorderedDataSend<'e>,
U::Storage: ReadOnlyStorage,
[src]
E: IntoEntitiesIterator<'e, U::Storage>,
U: UnorderedDataSend<'e>,
U::Storage: ReadOnlyStorage,
fn iter_for_entities_mut<'e, U, E>(
&'e mut self,
entities: E
) -> E::IntoEntitiesIterMut where
E: IntoEntitiesIterator<'e, U::Storage>,
U: UnorderedDataSend<'e>,
[src]
&'e mut self,
entities: E
) -> E::IntoEntitiesIterMut where
E: IntoEntitiesIterator<'e, U::Storage>,
U: UnorderedDataSend<'e>,
fn iter_for_entities_opt<'e, U, E>(
&'e self,
entities: E
) -> E::IntoEntitiesOptIter where
E: IntoEntitiesIterator<'e, U::Storage>,
U: UnorderedDataSend<'e>,
U::Storage: ReadOnlyStorage,
[src]
&'e self,
entities: E
) -> E::IntoEntitiesOptIter where
E: IntoEntitiesIterator<'e, U::Storage>,
U: UnorderedDataSend<'e>,
U::Storage: ReadOnlyStorage,
fn iter_for_entities_opt_mut<'e, U, E>(
&'e mut self,
entities: E
) -> E::IntoEntitiesOptIterMut where
E: IntoEntitiesIterator<'e, U::Storage>,
U: UnorderedDataSend<'e>,
[src]
&'e mut self,
entities: E
) -> E::IntoEntitiesOptIterMut where
E: IntoEntitiesIterator<'e, U::Storage>,
U: UnorderedDataSend<'e>,
fn entity_components<'r, S>(
&'r self,
entity: &Entity
) -> Option<<S as UnorderedData<'r>>::ComponentsRef> where
S: UnorderedDataSend<'r> + ReadOnlyOp<'r> + 'r,
S::Storage: StorageRef<'r, Component = S::ComponentsRef>,
[src]
&'r self,
entity: &Entity
) -> Option<<S as UnorderedData<'r>>::ComponentsRef> where
S: UnorderedDataSend<'r> + ReadOnlyOp<'r> + 'r,
S::Storage: StorageRef<'r, Component = S::ComponentsRef>,
fn entity_components_mut<'r, S>(
&'r mut self,
entity: &Entity
) -> Option<<S as UnorderedData<'r>>::ComponentsRef> where
S: UnorderedDataSend<'r> + 'r,
S::Storage: StorageRef<'r, Component = S::ComponentsRef>,
[src]
&'r mut self,
entity: &Entity
) -> Option<<S as UnorderedData<'r>>::ComponentsRef> where
S: UnorderedDataSend<'r> + 'r,
S::Storage: StorageRef<'r, Component = S::ComponentsRef>,
fn component_for<C: ComponentSend>(&self, entity: &Entity) -> Option<Ptr<'_, C>> where
<C as Component>::Storage: Storage<'s, C>,
[src]
<C as Component>::Storage: Storage<'s, C>,
fn component_for_mut<C: ComponentSend>(
&self,
entity: &Entity
) -> Option<PtrMut<'_, C>> where
<C as Component>::Storage: Storage<'s, C>,
[src]
&self,
entity: &Entity
) -> Option<PtrMut<'_, C>> where
<C as Component>::Storage: Storage<'s, C>,
fn has_component<C: 'static>(&self, entity: &Entity) -> bool
[src]
fn tree_node_for<C: ComponentSend>(
&self,
entity: &Entity
) -> Option<NodePtr<'_, C>> where
<C as Component>::Storage: HierarchicalStorage<'b, C>,
[src]
&self,
entity: &Entity
) -> Option<NodePtr<'_, C>> where
<C as Component>::Storage: HierarchicalStorage<'b, C>,
fn tree_node_for_mut<C: ComponentSend>(
&self,
entity: &Entity
) -> Option<NodePtrMut<'_, C>> where
<C as Component>::Storage: HierarchicalStorage<'b, C>,
[src]
&self,
entity: &Entity
) -> Option<NodePtrMut<'_, C>> where
<C as Component>::Storage: HierarchicalStorage<'b, C>,
fn changed_iter_for<'r, S>(
&'r self
) -> EntitiesComponentIter<'r, S::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::ChangedIter, <S as UnorderedData<'r>>::Storage> where
S: ChangedDataSend<'r> + EntitiesData + ReadOnlyOp<'r> + 'r,
<S as UnorderedData<'r>>::Storage: StorageRef<'r>,
fn changed_iter_for_mut<'r, S>(
&'r mut self
) -> EntitiesComponentIter<'r, S::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::ChangedIter, <S as UnorderedData<'r>>::Storage> where
S: ChangedDataSend<'r> + EntitiesData + 'r,
<S as UnorderedData<'r>>::Storage: StorageRef<'r>,
fn storage_for<'r, S>(&'r self) -> Sto<'r, S> where
S: UnorderedDataSend<'r> + ReadOnlyOp<'r>,
[src]
S: UnorderedDataSend<'r> + ReadOnlyOp<'r>,
fn storage_for_mut<'r, S>(&'r mut self) -> Sto<'r, S> where
S: UnorderedDataSend<'r>,
[src]
S: UnorderedDataSend<'r>,
impl EntitiesStorage for World
[src]
impl EntitiesStorage for World
[src]fn storage<C: Component>(
&self
) -> Option<ReadGuardRef<'_, <C as Component>::Storage>>
[src]
&self
) -> Option<ReadGuardRef<'_, <C as Component>::Storage>>
fn storage_mut<C: Component>(
&self
) -> Option<WriteGuardRef<'_, <C as Component>::Storage, <C as Component>::MutStorageCacheGuard>>
[src]
&self
) -> Option<WriteGuardRef<'_, <C as Component>::Storage, <C as Component>::MutStorageCacheGuard>>
fn entities_ref(&self) -> &[(Entity, MaskType)]
[src]
fn component_mask<C: 'static>(&self) -> MaskType
[src]
fn entities_for_mask<S: FastIndexExt>(
&self,
query_mask: Bitmask,
storage: &S
) -> IndexGuard<'_>
[src]
&self,
query_mask: Bitmask,
storage: &S
) -> IndexGuard<'_>
fn lazy_entities_for_mask(&self, query_mask: Bitmask) -> LazyIndexGuard<'_>
[src]
fn ordered_entities_for<C: Component, S: FastIndexExt>(
&self,
query_mask: Bitmask,
unordered_storage: &S
) -> OrderedIndexGuard<'_> where
<C as Component>::Storage: HierarchicalStorage<'b, C>,
[src]
&self,
query_mask: Bitmask,
unordered_storage: &S
) -> OrderedIndexGuard<'_> where
<C as Component>::Storage: HierarchicalStorage<'b, C>,
impl ResourcesCreationExt for World
[src]
impl ResourcesCreationExt for World
[src]fn with_resources_creation<F, R>(&mut self, f: F) -> R where
F: FnOnce(ResourcesCreation<'_>) -> R,
[src]
F: FnOnce(ResourcesCreation<'_>) -> R,
fn add_resource<T: 'static + Send>(&mut self, resource: T)
[src]
fn remove_resource<T: 'static>(&mut self) -> Option<T>
[src]
fn add_resource_thread_local<T: 'static>(&mut self, resource: T)
[src]
fn add_resource_as_trait<T, U: ?Sized, F, FMut>(
&mut self,
resource: (T, F, FMut)
) where
T: 'static + Send,
U: 'static + Send,
F: Fn(&T) -> &U + 'static,
FMut: Fn(&mut T) -> &mut U + 'static,
[src]
&mut self,
resource: (T, F, FMut)
) where
T: 'static + Send,
U: 'static + Send,
F: Fn(&T) -> &U + 'static,
FMut: Fn(&mut T) -> &mut U + 'static,
fn add_resource_as_trait_thread_local<T, U: ?Sized, F, FMut>(
&mut self,
resource: (T, F, FMut)
) where
T: 'static,
U: 'static,
F: Fn(&T) -> &U + 'static,
FMut: Fn(&mut T) -> &mut U + 'static,
[src]
&mut self,
resource: (T, F, FMut)
) where
T: 'static,
U: 'static,
F: Fn(&T) -> &U + 'static,
FMut: Fn(&mut T) -> &mut U + 'static,
impl ResourcesExt for World
[src]
impl ResourcesExt for World
[src]fn resource<T: 'static + Send>(&self) -> Option<ReadGuardRef<'_, T>>
[src]
fn resource_mut<T: 'static + Send>(&self) -> Option<WriteGuardRef<'_, T>>
[src]
fn resource_as_trait<T: 'static + Send + ?Sized>(
&self
) -> Option<ReadGuardRef<'_, T>>
[src]
&self
) -> Option<ReadGuardRef<'_, T>>
fn resource_as_trait_mut<T: 'static + Send + ?Sized>(
&self
) -> Option<WriteGuardRef<'_, T>>
[src]
&self
) -> Option<WriteGuardRef<'_, T>>
impl ResourcesThreadLocalExt for World
[src]
impl ResourcesThreadLocalExt for World
[src]fn resource_thread_local<T: 'static>(&self) -> Option<ReadGuardRef<'_, T>>
[src]
fn resource_thread_local_mut<T: 'static>(&self) -> Option<WriteGuardRef<'_, T>>
[src]
fn resource_as_trait_thread_local<T: 'static + ?Sized>(
&self
) -> Option<ReadGuardRef<'_, T>>
[src]
&self
) -> Option<ReadGuardRef<'_, T>>
fn resource_as_trait_thread_local_mut<T: 'static + ?Sized>(
&self
) -> Option<WriteGuardRef<'_, T>>
[src]
&self
) -> Option<WriteGuardRef<'_, T>>