[]Trait bevy::prelude::System

pub trait System: 'static + Send + Sync {
    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

type Out

Loading content...

Required methods

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>

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)

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

Loading content...

Provided methods

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

Loading content...

Implementors

impl System for FixedTimestep

type In = ()

type Out = ShouldRun

impl System for RunOnce

type In = ()

type Out = ShouldRun

impl System for ThreadLocalSystemFn

type In = ()

type Out = ()

impl<In, Out> System for InputFuncSystem<In, Out> where
    In: 'static,
    Out: 'static, 

type In = In

type Out = Out

impl<Out> System for FuncSystem<Out> where
    Out: 'static, 

type In = ()

type Out = Out

impl<SystemA, SystemB> System for ChainSystem<SystemA, SystemB> where
    SystemB: System<In = <SystemA as System>::Out>,
    SystemA: System

type In = <SystemA as System>::In

type Out = <SystemB as System>::Out

Loading content...