pub struct Dispatcher<'a, 'b> { /* private fields */ }
Expand description

The dispatcher struct, allowing systems to be executed in parallel.

Implementations

Sets up all the systems which means they are gonna add default values for the resources they need.

Calls the dispose method of all systems and allows them to release external resources. It is common this method removes components and / or resources from the World which are associated with external resources.

Dispatch all the systems with given resources and context and then run thread local systems.

This function automatically redirects to

and runs dispatch_thread_local afterwards.

Please note that this method assumes that no resource is currently borrowed. If that’s the case, it panics.

Dispatches the systems (except thread local systems) in parallel given the resources to operate on.

This operation blocks the executing thread.

Only available with “parallel” feature enabled.

Please note that this method assumes that no resource is currently borrowed. If that’s the case, it panics.

Dispatches the systems (except thread local systems) sequentially.

This is useful if parallel overhead is too big or the platform does not support multithreading.

Please note that this method assumes that no resource is currently borrowed. If that’s the case, it panics.

Dispatch only thread local systems sequentially.

Please note that this method assumes that no resource is currently borrowed. If that’s the case, it panics.

This method returns the largest amount of threads this dispatcher can make use of. This is mainly for debugging purposes so you can see how well your systems can make use of multi-threading.

Trait Implementations

Runs the system now. Read more

Sets up World for a later call to run_now.

Performs clean up that requires resources from the World. This commonly removes components from world which depend on external resources. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.