Trait specs::System [−][src]
pub trait System<'a> { type SystemData: DynamicSystemData<'a>; fn run(&mut self, data: Self::SystemData); fn running_time(&self) -> RunningTime { ... } fn accessor(&'b self) -> AccessorCow<'a, 'b, Self> { ... } fn setup(&mut self, world: &mut World) { ... } fn dispose(self, world: &mut World) { ... } }
Expand description
A System
, executed with a set of required Resource
s.
Associated Types
type SystemData: DynamicSystemData<'a>
[src]
type SystemData: DynamicSystemData<'a>
[src]The resource bundle required to execute this system.
You will mostly use a tuple of system data (which also implements
SystemData
). You can also create such a resource bundle by simply
deriving SystemData
for a struct.
Every SystemData
is also a DynamicSystemData
.
Required methods
fn run(&mut self, data: Self::SystemData)
[src]
fn run(&mut self, data: Self::SystemData)
[src]Executes the system with the required system data.
Provided methods
fn running_time(&self) -> RunningTime
[src]
fn running_time(&self) -> RunningTime
[src]Returns a hint how long the system needs for running. This is used to optimize the way they’re executed (might allow more parallelization).
Defaults to RunningTime::Average
.
fn accessor(&'b self) -> AccessorCow<'a, 'b, Self>
[src]
fn accessor(&'b self) -> AccessorCow<'a, 'b, Self>
[src]Return the accessor from the SystemData
.