Trait legion::systems::Runnable[][src]

pub trait Runnable {
    fn name(&self) -> Option<&SystemId>;
fn reads(&self) -> (&[ResourceTypeId], &[ComponentTypeId]);
fn writes(&self) -> (&[ResourceTypeId], &[ComponentTypeId]);
fn prepare(&mut self, world: &World);
fn accesses_archetypes(&self) -> &ArchetypeAccess;
unsafe fn run_unsafe(&mut self, world: &World, resources: &UnsafeResources);
fn command_buffer_mut(
        &mut self,
        world: WorldId
    ) -> Option<&mut CommandBuffer>; fn run(&mut self, world: &mut World, resources: &mut Resources) { ... } }
Expand description

Trait describing a schedulable type. This is implemented by System

Required methods

Gets the name of the system.

Gets the resources and component types read by the system.

Gets the resources and component types written by the system.

Prepares the system for execution against a world.

Gets the set of archetypes the system will access when run, as determined when the system was last prepared.

Runs the system.

Safety

The shared references to world and resources may result in unsound mutable aliasing if other code is accessing the same components or resources as this system. Prefer to use run when possible.

Additionally, systems which are !Sync should never be invoked on a different thread to that which owns the resources collection passed into this function.

Gets the system’s command buffer.

Provided methods

Runs the system.

Trait Implementations

Formats the value using the given formatter. Read more

Implementors