pub trait RunSystem: 'static + Send + Sync {
type Param: SystemParam;
fn run(
param: <<Self::Param as SystemParam>::Fetch as SystemParamFetch<'_, '_>>::Item
);
fn system(world: &mut World) -> ParamSystem<Self::Param> { ... }
}
Expand description
A trait for defining systems with a SystemParam
associated type.
This facilitates the creation of systems that are generic over some trait
and that use that trait’s associated types as SystemParam
s.
Associated Types
type Param: SystemParam
type Param: SystemParam
The SystemParam
type passed to the system when it runs.
Required methods
fn run(
param: <<Self::Param as SystemParam>::Fetch as SystemParamFetch<'_, '_>>::Item
)
fn run(
param: <<Self::Param as SystemParam>::Fetch as SystemParamFetch<'_, '_>>::Item
)
Runs the system.
Provided methods
fn system(world: &mut World) -> ParamSystem<Self::Param>
fn system(world: &mut World) -> ParamSystem<Self::Param>
Creates a concrete instance of the system for the specified World
.