Trait specs::SystemData

source ·
pub trait SystemData<'a> {
    fn setup(res: &mut Resources);
    fn fetch(res: &'a Resources) -> Self;
    fn reads() -> Vec<ResourceId, Global>;
    fn writes() -> Vec<ResourceId, Global>;
}
Expand description

A static system data that can specify its dependencies at statically (at compile-time). Most system data is a SystemData, the DynamicSystemData type is only needed for very special setups.

Required Methods

Sets up the system data for fetching it from the Resources.

Fetches the system data from Resources. Note that this is only specified for one concrete lifetime 'a, you need to implement the SystemData trait for every possible lifetime.

Returns all read dependencies as fetched from Self::fetch.

Please note that returning wrong dependencies can lead to a panic.

Returns all write dependencies as fetched from Self::fetch.

Please note that returning wrong dependencies can lead to a panic.

Implementations on Foreign Types

Implementors