[−][src]Struct specs_task::TaskMaker
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]
&self,
entity: Entity,
task: T
)
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]
&self,
task: T
) -> Entity
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]
&self,
entity: Entity,
task: T,
on_completion: OnCompletion
) -> Entity
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]
&self,
task: T,
on_completion: OnCompletion
) -> Entity
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]
Read<'a, LazyUpdate>: SystemData<'a>,
Entities<'a>: SystemData<'a>,
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]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,
fn get_type_id(&self) -> TypeId
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<'a, T> DynamicSystemData<'a> for T where
T: SystemData<'a>,
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
fn setup(&StaticAccessor<T>, world: &mut World)
fn fetch(&StaticAccessor<T>, world: &'a World) -> T
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Resource for T where
T: Any,
T: Any,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,