pub trait System: Send + Sync + 'static {
type In;
type Out;
fn meta(&self) -> &SystemMeta;
unsafe fn meta_mut(&mut self) -> &mut SystemMeta;
unsafe fn run(&mut self, input: Self::In, world: &World) -> Self::Out;
fn init(&mut self, _world: &mut World) { ... }
fn apply(&mut self, _world: &mut World) { ... }
fn check_change_tick(&mut self, change_tick: u32) { ... }
fn set_last_change_tick(&mut self, last_change_tick: u32) { ... }
}
Required Associated Types
Required Methods
fn meta(&self) -> &SystemMeta
sourceunsafe fn meta_mut(&mut self) -> &mut SystemMeta
unsafe fn meta_mut(&mut self) -> &mut SystemMeta
Safety
SystemMeta::access
must not be modified
sourceunsafe fn run(&mut self, input: Self::In, world: &World) -> Self::Out
unsafe fn run(&mut self, input: Self::In, world: &World) -> Self::Out
Safety
world
must be the same world that was used toSystem::init
this system.- This system must not run at the same time as another system that has conflicting
Access
. UseSystem::meta
to guarantee this.