Trait bevy::ecs::system::ExclusiveSystemParam
source · pub trait ExclusiveSystemParam: Sized {
type State: Send + Sync + 'static;
type Item<'s>: ExclusiveSystemParam<State = Self::State>;
// Required methods
fn init(world: &mut World, system_meta: &mut SystemMeta) -> Self::State;
fn get_param<'s>(
state: &'s mut Self::State,
system_meta: &SystemMeta
) -> Self::Item<'s>;
}
Expand description
A parameter that can be used in an exclusive system (a system with an &mut World
parameter).
Any parameters implementing this trait must come after the &mut World
parameter.
Required Associated Types§
sourcetype State: Send + Sync + 'static
type State: Send + Sync + 'static
Used to store data which persists across invocations of a system.
sourcetype Item<'s>: ExclusiveSystemParam<State = Self::State>
type Item<'s>: ExclusiveSystemParam<State = Self::State>
The item type returned when constructing this system param.
See SystemParam::Item
.
Required Methods§
sourcefn init(world: &mut World, system_meta: &mut SystemMeta) -> Self::State
fn init(world: &mut World, system_meta: &mut SystemMeta) -> Self::State
Creates a new instance of this param’s State
.
sourcefn get_param<'s>(
state: &'s mut Self::State,
system_meta: &SystemMeta
) -> Self::Item<'s>
fn get_param<'s>( state: &'s mut Self::State, system_meta: &SystemMeta ) -> Self::Item<'s>
Creates a parameter to be passed into an ExclusiveSystemParamFunction
.
Object Safety§
This trait is not object safe.