Skip to main content

TaskFactory

Trait TaskFactory 

Source
pub trait TaskFactory {
    // Required method
    fn create_task(&self, user: &TaskUser<'_>) -> Entity;
}
Expand description

Implemented by all nodes of a TaskGraph. Has a blanket impl that should work for most TaskComponents.

Required Methods§

Source

fn create_task(&self, user: &TaskUser<'_>) -> Entity

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl TaskFactory for Entity

Source§

fn create_task(&self, _user: &TaskUser<'_>) -> Entity

Implementors§

Source§

impl<'a, T: 'static + Clone + TaskComponent<'a> + Send + Sync> TaskFactory for T