Struct specs::Planner [] [src]

pub struct Planner<C> {
    pub systems: Vec<SystemInfo<C>>,
    // some fields omitted
}

System execution planner. Allows running systems via closures, distributes the load in parallel using a thread pool.

Fields

systems: Vec<SystemInfo<C>>

Permanent systems in the planner.

Methods

impl<C: 'static> Planner<C>
[src]

fn new(world: World, num_threads: usize) -> Planner<C>

Creates a new planner, given the world and the thread count.

fn add_system<S>(&mut self, sys: S, name: &str, priority: Priority) where S: 'static + System<C>

Add a system to the dispatched list.

fn run_custom<F>(&mut self, functor: F) where F: 'static + Send + FnOnce(RunArg)

Runs a custom system.

fn mut_world(&mut self) -> &mut World

Waits for all currently executing systems to finish, and then returns the mutable borrow of the world, allowing to create entities instantly.

fn wait(&mut self)

Waits for all currently executing systems to finish, and then merges all queued changes.

impl<C: Clone + Send + 'static> Planner<C>
[src]

fn dispatch(&mut self, context: C)

Dispatch all systems according to their associated priorities.

impl<C: 'static> Planner<C>
[src]

fn run0w1r<R0, F: 'static + Send + FnMut(&R0)>(&mut self, functor: F) where R0: Component

impl<C: 'static> Planner<C>
[src]

fn run0w2r<R0, R1, F: 'static + Send + FnMut(&R0, &R1)>(&mut self, functor: F) where R0: Component, R1: Component

impl<C: 'static> Planner<C>
[src]

fn run0w3r<R0, R1, R2, F: 'static + Send + FnMut(&R0, &R1, &R2)>(&mut self, functor: F) where R0: Component, R1: Component, R2: Component

impl<C: 'static> Planner<C>
[src]

fn run0w4r<R0, R1, R2, R3, F: 'static + Send + FnMut(&R0, &R1, &R2, &R3)>(&mut self, functor: F) where R0: Component, R1: Component, R2: Component, R3: Component

impl<C: 'static> Planner<C>
[src]

fn run1w0r<W0, F: 'static + Send + FnMut(&mut W0)>(&mut self, functor: F) where W0: Component

impl<C: 'static> Planner<C>
[src]

fn run1w1r<W0, R0, F: 'static + Send + FnMut(&mut W0, &R0)>(&mut self, functor: F) where W0: Component, R0: Component

impl<C: 'static> Planner<C>
[src]

fn run1w2r<W0, R0, R1, F: 'static + Send + FnMut(&mut W0, &R0, &R1)>(&mut self, functor: F) where W0: Component, R0: Component, R1: Component

impl<C: 'static> Planner<C>
[src]

fn run1w3r<W0, R0, R1, R2, F: 'static + Send + FnMut(&mut W0, &R0, &R1, &R2)>(&mut self, functor: F) where W0: Component, R0: Component, R1: Component, R2: Component

impl<C: 'static> Planner<C>
[src]

fn run1w4r<W0, R0, R1, R2, R3, F: 'static + Send + FnMut(&mut W0, &R0, &R1, &R2, &R3)>(&mut self, functor: F) where W0: Component, R0: Component, R1: Component, R2: Component, R3: Component

impl<C: 'static> Planner<C>
[src]

fn run1w5r<W0, R0, R1, R2, R3, R4, F: 'static + Send + FnMut(&mut W0, &R0, &R1, &R2, &R3, &R4)>(&mut self, functor: F) where W0: Component, R0: Component, R1: Component, R2: Component, R3: Component, R4: Component

impl<C: 'static> Planner<C>
[src]

fn run1w6r<W0, R0, R1, R2, R3, R4, R5, F: 'static + Send + FnMut(&mut W0, &R0, &R1, &R2, &R3, &R4, &R5)>(&mut self, functor: F) where W0: Component, R0: Component, R1: Component, R2: Component, R3: Component, R4: Component, R5: Component

impl<C: 'static> Planner<C>
[src]

fn run1w7r<W0, R0, R1, R2, R3, R5, R6, R7, F: 'static + Send + FnMut(&mut W0, &R0, &R1, &R2, &R3, &R5, &R6, &R7)>(&mut self, functor: F) where W0: Component, R0: Component, R1: Component, R2: Component, R3: Component, R5: Component, R6: Component, R7: Component

impl<C: 'static> Planner<C>
[src]

fn run2w0r<W0, W1, F: 'static + Send + FnMut(&mut W0, &mut W1)>(&mut self, functor: F) where W0: Component, W1: Component

impl<C: 'static> Planner<C>
[src]

fn run2w1r<W0, W1, R0, F: 'static + Send + FnMut(&mut W0, &mut W1, &R0)>(&mut self, functor: F) where W0: Component, W1: Component, R0: Component

impl<C: 'static> Planner<C>
[src]

fn run2w2r<W0, W1, R0, R1, F: 'static + Send + FnMut(&mut W0, &mut W1, &R0, &R1)>(&mut self, functor: F) where W0: Component, W1: Component, R0: Component, R1: Component