[][src]Trait async_ecs::system::AsyncSystem

pub trait AsyncSystem<'a>: Sized {
    type SystemData: DynamicSystemData<'a>;
    pub fn run_async(&mut self, data: Self::SystemData) -> BoxFuture<'a, ()>;

    pub fn init(&mut self) { ... }
pub fn accessor<'b>(&'b self) -> AccessorCow<'a, 'b, Self::SystemData> { ... }
pub fn setup(&mut self, world: &mut World) { ... }
pub fn dispose(self, world: &mut World)
    where
        Self: Sized
, { ... } }

A System, executed with a set of required Resources asynchronous.

Associated Types

type SystemData: DynamicSystemData<'a>[src]

The resource bundle required to execute a system.

You will mostly use a tuple of system data (which also implements SystemData). You can also create such a resource bundle by simply deriving SystemData for a struct.

Every SystemData is also a DynamicSystemData.

Loading content...

Required methods

pub fn run_async(&mut self, data: Self::SystemData) -> BoxFuture<'a, ()>[src]

Executes the system with the required system data asynchronous.

Loading content...

Provided methods

pub fn init(&mut self)[src]

Initialize the systems.

pub fn accessor<'b>(&'b self) -> AccessorCow<'a, 'b, Self::SystemData>[src]

Return the accessor from the SystemData.

pub fn setup(&mut self, world: &mut World)[src]

Sets up the World using Self::SystemData::setup.

pub fn dispose(self, world: &mut World) where
    Self: Sized
[src]

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

Loading content...

Implementors

Loading content...