[][src]Struct specs_task::TaskMaker

pub struct TaskMaker<'a> { /* fields omitted */ }

A SystemData used for creating and assembling task graphs.

Implementations

impl<'a> TaskMaker<'a>[src]

pub fn make_task_with_entity<'b, T: TaskComponent<'b> + Send + Sync>(
    &self,
    entity: Entity,
    task: T
)
[src]

Like make_task, but use entity for tracking the task components. This can make it easier to manage tasks coupled with a specific entity (rather than storing a separate task entity in a component).

pub fn make_task<'b, T: TaskComponent<'b> + Send + Sync>(
    &self,
    task: T
) -> Entity
[src]

Create a new task entity with the given TaskComponent. The task will not make progress until it is either finalized or the descendent of a finalized entity.

pub fn make_final_task_with_entity<'b, T: TaskComponent<'b> + Send + Sync>(
    &self,
    entity: Entity,
    task: T,
    on_completion: OnCompletion
) -> Entity
[src]

Same as make_task_with_entity, but also finalizes the task.

pub fn make_final_task<'b, T: TaskComponent<'b> + Send + Sync>(
    &self,
    task: T,
    on_completion: OnCompletion
) -> Entity
[src]

Same as make_task, but also finalizes the task.

pub fn make_fork(&self) -> Entity[src]

Create a new fork entity with no children.

pub fn add_prong(&self, fork_entity: Entity, prong: Entity)[src]

Add prong as a child on the MultiEdge of fork_entity.

pub fn join(&self, parent: Entity, child: Entity)[src]

Creates a SingleEdge from parent to child. Creates a fork-join if parent is a fork.

pub fn finalize(&self, entity: Entity, on_completion: OnCompletion)[src]

Mark entity as final. This will make all of entity's descendents visible to the TaskManagerSystem, allowing them to make progress. If OnCompletion::Delete, then entity and all of its descendents will be deleted when entity is complete (and hence the entire graph is complete). Otherwise, you need to clean up the entities your self by calling delete_entity_and_descendents. God help you if you leak an orphaned entity.

Trait Implementations

impl<'a> SystemData<'a> for TaskMaker<'a> where
    Read<'a, LazyUpdate>: SystemData<'a>,
    Entities<'a>: SystemData<'a>, 
[src]

Auto Trait Implementations

impl<'a> !RefUnwindSafe for TaskMaker<'a>

impl<'a> !Send for TaskMaker<'a>

impl<'a> !Sync for TaskMaker<'a>

impl<'a> Unpin for TaskMaker<'a>

impl<'a> !UnwindSafe for TaskMaker<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<'a, T> DynamicSystemData<'a> for T where
    T: SystemData<'a>, 

type Accessor = StaticAccessor<T>

The accessor of the SystemData, which specifies the read and write dependencies and does the fetching. Read more

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Resource for T where
    T: Any, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.