[][src]Trait bevy_ecs::prelude::System

pub trait System: Send + Sync + 'static {
    type In;
    type Out;
    pub fn name(&self) -> Cow<'static, str>;
pub fn id(&self) -> SystemId;
pub fn update(&mut self, world: &World);
pub fn archetype_component_access(&self) -> &TypeAccess<ArchetypeComponent>;
pub fn resource_access(&self) -> &TypeAccess<TypeId>;
pub fn thread_local_execution(&self) -> ThreadLocalExecution;
pub unsafe fn run_unsafe(
        &mut self,
        input: Self::In,
        world: &World,
        resources: &Resources
    ) -> Option<Self::Out>;
pub fn run_thread_local(
        &mut self,
        world: &mut World,
        resources: &mut Resources
    );
pub fn initialize(&mut self, _world: &mut World, _resources: &mut Resources); pub fn run(
        &mut self,
        input: Self::In,
        world: &mut World,
        resources: &mut Resources
    ) -> Option<Self::Out> { ... } }

An ECS system that can be added to a Schedule

Associated Types

type In[src]

type Out[src]

Loading content...

Required methods

pub fn name(&self) -> Cow<'static, str>[src]

pub fn id(&self) -> SystemId[src]

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

pub fn archetype_component_access(&self) -> &TypeAccess<ArchetypeComponent>[src]

pub fn resource_access(&self) -> &TypeAccess<TypeId>[src]

pub fn thread_local_execution(&self) -> ThreadLocalExecution[src]

pub unsafe fn run_unsafe(
    &mut self,
    input: Self::In,
    world: &World,
    resources: &Resources
) -> Option<Self::Out>
[src]

Safety

This might access World and Resources in an unsafe manner. This should only be called in one of the following contexts:

  1. This system is the only system running on the given World and Resources across all threads
  2. This system only runs in parallel with other systems that do not conflict with the archetype_component_access() or resource_access()

pub fn run_thread_local(&mut self, world: &mut World, resources: &mut Resources)[src]

pub fn initialize(&mut self, _world: &mut World, _resources: &mut Resources)[src]

Loading content...

Provided methods

pub fn run(
    &mut self,
    input: Self::In,
    world: &mut World,
    resources: &mut Resources
) -> Option<Self::Out>
[src]

Loading content...

Implementors

impl System for RunOnce[src]

type In = ()

type Out = ShouldRun

impl System for ThreadLocalSystemFn[src]

type In = ()

type Out = ()

impl<In: 'static, Out: 'static> System for InputFuncSystem<In, Out>[src]

type In = In

type Out = Out

impl<Out: 'static> System for FuncSystem<Out>[src]

type In = ()

type Out = Out

impl<SystemA: System, SystemB: System<In = SystemA::Out>> System for ChainSystem<SystemA, SystemB>[src]

type In = SystemA::In

type Out = SystemB::Out

Loading content...