Trait oxygengine_core::ecs::shred::DynamicSystemData [−][src]
pub trait DynamicSystemData<'a> {
type Accessor: Accessor;
fn setup(accessor: &Self::Accessor, world: &mut World);
fn fetch(access: &Self::Accessor, world: &'a World) -> Self;
}Expand description
A struct implementing system data indicates that it bundles some resources which are required for the execution.
This is the more flexible, but complex variant of SystemData.
Associated Types
Required methods
Sets up World for fetching this system data.
Creates a new resource bundle
by fetching the required resources
from the World struct.
Contract
Only fetch the resources you returned from reads / writes!
Panics
This function may panic if the above contract is violated.
This function may panic if the resource doesn’t exist. This is only the
case if either setup was not called or it didn’t insert any
fallback value.
Implementors
type Accessor = BatchAccessorpub fn setup(
_accessor: &<BatchUncheckedWorld<'a> as DynamicSystemData<'a>>::Accessor,
_world: &mut World
)[src]pub fn fetch(
_access: &<BatchUncheckedWorld<'a> as DynamicSystemData<'a>>::Accessor,
world: &'a World
) -> BatchUncheckedWorld<'a>[src]type Accessor = StaticAccessor<T>