[]Trait acute_ecs::systems::prelude::Runnable

pub trait Runnable {
    fn name(&self) -> &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: &Resources);
fn command_buffer_mut(
        &self,
        world: WorldId
    ) -> Option<RefMut<'_, CommandBuffer>>; fn run(&mut self, world: &mut World, resources: &mut Resources) { ... } }

Trait describing a schedulable type. This is implemented by System

Required methods

fn name(&self) -> &SystemId

Gets the name of the system.

fn reads(&self) -> (&[ResourceTypeId], &[ComponentTypeId])

Gets the resources and component types read by the system.

fn writes(&self) -> (&[ResourceTypeId], &[ComponentTypeId])

Gets the resources and component types written by the system.

fn prepare(&mut self, world: &World)

Prepares the system for execution against a world.

fn accesses_archetypes(&self) -> &ArchetypeAccess

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

unsafe fn run_unsafe(&mut self, world: &World, resources: &Resources)

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.

fn command_buffer_mut(
    &self,
    world: WorldId
) -> Option<RefMut<'_, CommandBuffer>>

Gets the system's command buffer.

Loading content...

Provided methods

fn run(&mut self, world: &mut World, resources: &mut Resources)

Runs the system.

Loading content...

Implementors

impl<R, Q, F> Runnable for System<R, Q, F> where
    F: SystemFn<Resources = <R as ResourceSet>::PreparedResources, Queries = Q>,
    Q: QuerySet,
    R: ResourceSet

Loading content...