bevy_ecs::system

Trait SystemParam

Source
pub unsafe trait SystemParam: Sized {
    type State: Send + Sync + 'static;
    type Item<'world, 'state>: SystemParam<State = Self::State>;

    // Required methods
    fn init_state(
        world: &mut World,
        system_meta: &mut SystemMeta,
    ) -> Self::State;
    unsafe fn get_param<'world, 'state>(
        state: &'state mut Self::State,
        system_meta: &SystemMeta,
        world: UnsafeWorldCell<'world>,
        change_tick: Tick,
    ) -> Self::Item<'world, 'state>;

    // Provided methods
    unsafe fn new_archetype(
        state: &mut Self::State,
        archetype: &Archetype,
        system_meta: &mut SystemMeta,
    ) { ... }
    fn apply(
        state: &mut Self::State,
        system_meta: &SystemMeta,
        world: &mut World,
    ) { ... }
    fn queue(
        state: &mut Self::State,
        system_meta: &SystemMeta,
        world: DeferredWorld<'_>,
    ) { ... }
}
Expand description

A parameter that can be used in a System.

§Derive

This trait can be derived with the super::SystemParam macro. This macro only works if each field on the derived struct implements SystemParam. Note: There are additional requirements on the field types. See the Generic SystemParams section for details and workarounds of the probable cause if this derive causes an error to be emitted.

Derived SystemParam structs may have two lifetimes: 'w for data stored in the World, and 's for data stored in the parameter’s state.

The following list shows the most common SystemParams and which lifetime they require

Query<'w, 's, Entity>,
Res<'w, SomeResource>,
ResMut<'w, SomeOtherResource>,
Local<'s, u8>,
Commands<'w, 's>,
EventReader<'w, 's, SomeEvent>,
EventWriter<'w, SomeEvent>

§PhantomData

PhantomData is a special type of SystemParam that does nothing. This is useful for constraining generic types or lifetimes.

§Example

use std::marker::PhantomData;
use bevy_ecs::system::SystemParam;

#[derive(SystemParam)]
struct MyParam<'w, Marker: 'static> {
    foo: Res<'w, SomeResource>,
    marker: PhantomData<Marker>,
}

fn my_system<T: 'static>(param: MyParam<T>) {
    // Access the resource through `param.foo`
}

§Generic SystemParams

When using the derive macro, you may see an error in the form of:

expected ... [ParamType]
found associated type `<[ParamType] as SystemParam>::Item<'_, '_>`

where [ParamType] is the type of one of your fields. To solve this error, you can wrap the field of type [ParamType] with StaticSystemParam (i.e. StaticSystemParam<[ParamType]>).

§Details

The derive macro requires that the SystemParam implementation of each field F’s Item’s is itself F (ignoring lifetimes for simplicity). This assumption is due to type inference reasons, so that the derived SystemParam can be used as an argument to a function system. If the compiler cannot validate this property for [ParamType], it will error in the form shown above.

This will most commonly occur when working with SystemParams generically, as the requirement has not been proven to the compiler.

§Safety

The implementor must ensure the following is true.

Required Associated Types§

Source

type State: Send + Sync + 'static

Used to store data which persists across invocations of a system.

Source

type Item<'world, 'state>: SystemParam<State = Self::State>

The item type returned when constructing this system param. The value of this associated type should be Self, instantiated with new lifetimes.

You could think of SystemParam::Item<'w, 's> as being an operation that changes the lifetimes bound to Self.

Required Methods§

Source

fn init_state(world: &mut World, system_meta: &mut SystemMeta) -> Self::State

Registers any World access used by this SystemParam and creates a new instance of this param’s State.

Source

unsafe fn get_param<'world, 'state>( state: &'state mut Self::State, system_meta: &SystemMeta, world: UnsafeWorldCell<'world>, change_tick: Tick, ) -> Self::Item<'world, 'state>

Creates a parameter to be passed into a SystemParamFunction.

§Safety
  • The passed UnsafeWorldCell must have access to any world data registered in init_state.
  • world must be the same World that was used to initialize state.

Provided Methods§

Source

unsafe fn new_archetype( state: &mut Self::State, archetype: &Archetype, system_meta: &mut SystemMeta, )

For the specified Archetype, registers the components accessed by this SystemParam (if applicable).a

§Safety

archetype must be from the World used to initialize state in init_state.

Source

fn apply(state: &mut Self::State, system_meta: &SystemMeta, world: &mut World)

Applies any deferred mutations stored in this SystemParam’s state. This is used to apply Commands during apply_deferred.

Source

fn queue( state: &mut Self::State, system_meta: &SystemMeta, world: DeferredWorld<'_>, )

Queues any deferred mutations to be applied at the next apply_deferred.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl SystemParam for ()

Source§

type State = ()

Source§

type Item<'w, 's> = ()

Source§

fn init_state(_world: &mut World, _system_meta: &mut SystemMeta) -> Self::State

Source§

unsafe fn new_archetype( (): &mut Self::State, _archetype: &Archetype, _system_meta: &mut SystemMeta, )

Source§

fn apply((): &mut Self::State, _system_meta: &SystemMeta, _world: &mut World)

Source§

fn queue( (): &mut Self::State, _system_meta: &SystemMeta, _world: DeferredWorld<'_>, )

Source§

unsafe fn get_param<'w, 's>( state: &'s mut Self::State, _system_meta: &SystemMeta, _world: UnsafeWorldCell<'w>, _change_tick: Tick, ) -> Self::Item<'w, 's>

Source§

impl<'a, T: 'static> SystemParam for Option<NonSendMut<'a, T>>

Source§

type State = ComponentId

Source§

type Item<'w, 's> = Option<NonSendMut<'w, T>>

Source§

fn init_state(world: &mut World, system_meta: &mut SystemMeta) -> Self::State

Source§

unsafe fn get_param<'w, 's>( component_id: &'s mut Self::State, system_meta: &SystemMeta, world: UnsafeWorldCell<'w>, change_tick: Tick, ) -> Self::Item<'w, 's>

Source§

impl<'a, T: Resource> SystemParam for Option<Res<'a, T>>

Source§

type State = ComponentId

Source§

type Item<'w, 's> = Option<Res<'w, T>>

Source§

fn init_state(world: &mut World, system_meta: &mut SystemMeta) -> Self::State

Source§

unsafe fn get_param<'w, 's>( component_id: &'s mut Self::State, system_meta: &SystemMeta, world: UnsafeWorldCell<'w>, change_tick: Tick, ) -> Self::Item<'w, 's>

Source§

impl<'a, T: Resource> SystemParam for Option<ResMut<'a, T>>

Source§

type State = ComponentId

Source§

type Item<'w, 's> = Option<ResMut<'w, T>>

Source§

fn init_state(world: &mut World, system_meta: &mut SystemMeta) -> Self::State

Source§

unsafe fn get_param<'w, 's>( component_id: &'s mut Self::State, system_meta: &SystemMeta, world: UnsafeWorldCell<'w>, change_tick: Tick, ) -> Self::Item<'w, 's>

Source§

impl<P0: SystemParam> SystemParam for (P0,)

Source§

type State = (<P0 as SystemParam>::State,)

Source§

type Item<'w, 's> = (<P0 as SystemParam>::Item<'w, 's>,)

Source§

fn init_state(_world: &mut World, _system_meta: &mut SystemMeta) -> Self::State

Source§

unsafe fn new_archetype( (P0): &mut Self::State, _archetype: &Archetype, _system_meta: &mut SystemMeta, )

Source§

fn apply((P0): &mut Self::State, _system_meta: &SystemMeta, _world: &mut World)

Source§

fn queue( (P0): &mut Self::State, _system_meta: &SystemMeta, _world: DeferredWorld<'_>, )

Source§

unsafe fn get_param<'w, 's>( state: &'s mut Self::State, _system_meta: &SystemMeta, _world: UnsafeWorldCell<'w>, _change_tick: Tick, ) -> Self::Item<'w, 's>

Source§

impl<P0: SystemParam, P1: SystemParam> SystemParam for (P0, P1)

Source§

type State = (<P0 as SystemParam>::State, <P1 as SystemParam>::State)

Source§

type Item<'w, 's> = (<P0 as SystemParam>::Item<'w, 's>, <P1 as SystemParam>::Item<'w, 's>)

Source§

fn init_state(_world: &mut World, _system_meta: &mut SystemMeta) -> Self::State

Source§

unsafe fn new_archetype( (P0, P1): &mut Self::State, _archetype: &Archetype, _system_meta: &mut SystemMeta, )

Source§

fn apply( (P0, P1): &mut Self::State, _system_meta: &SystemMeta, _world: &mut World, )

Source§

fn queue( (P0, P1): &mut Self::State, _system_meta: &SystemMeta, _world: DeferredWorld<'_>, )

Source§

unsafe fn get_param<'w, 's>( state: &'s mut Self::State, _system_meta: &SystemMeta, _world: UnsafeWorldCell<'w>, _change_tick: Tick, ) -> Self::Item<'w, 's>

Source§

impl<P0: SystemParam, P1: SystemParam, P2: SystemParam> SystemParam for (P0, P1, P2)

Source§

type State = (<P0 as SystemParam>::State, <P1 as SystemParam>::State, <P2 as SystemParam>::State)

Source§

type Item<'w, 's> = (<P0 as SystemParam>::Item<'w, 's>, <P1 as SystemParam>::Item<'w, 's>, <P2 as SystemParam>::Item<'w, 's>)

Source§

fn init_state(_world: &mut World, _system_meta: &mut SystemMeta) -> Self::State

Source§

unsafe fn new_archetype( (P0, P1, P2): &mut Self::State, _archetype: &Archetype, _system_meta: &mut SystemMeta, )

Source§

fn apply( (P0, P1, P2): &mut Self::State, _system_meta: &SystemMeta, _world: &mut World, )

Source§

fn queue( (P0, P1, P2): &mut Self::State, _system_meta: &SystemMeta, _world: DeferredWorld<'_>, )

Source§

unsafe fn get_param<'w, 's>( state: &'s mut Self::State, _system_meta: &SystemMeta, _world: UnsafeWorldCell<'w>, _change_tick: Tick, ) -> Self::Item<'w, 's>

Source§

impl<P0: SystemParam, P1: SystemParam, P2: SystemParam, P3: SystemParam> SystemParam for (P0, P1, P2, P3)

Source§

type State = (<P0 as SystemParam>::State, <P1 as SystemParam>::State, <P2 as SystemParam>::State, <P3 as SystemParam>::State)

Source§

type Item<'w, 's> = (<P0 as SystemParam>::Item<'w, 's>, <P1 as SystemParam>::Item<'w, 's>, <P2 as SystemParam>::Item<'w, 's>, <P3 as SystemParam>::Item<'w, 's>)

Source§

fn init_state(_world: &mut World, _system_meta: &mut SystemMeta) -> Self::State

Source§

unsafe fn new_archetype( (P0, P1, P2, P3): &mut Self::State, _archetype: &Archetype, _system_meta: &mut SystemMeta, )

Source§

fn apply( (P0, P1, P2, P3): &mut Self::State, _system_meta: &SystemMeta, _world: &mut World, )

Source§

fn queue( (P0, P1, P2, P3): &mut Self::State, _system_meta: &SystemMeta, _world: DeferredWorld<'_>, )

Source§

unsafe fn get_param<'w, 's>( state: &'s mut Self::State, _system_meta: &SystemMeta, _world: UnsafeWorldCell<'w>, _change_tick: Tick, ) -> Self::Item<'w, 's>

Source§

impl<P0: SystemParam, P1: SystemParam, P2: SystemParam, P3: SystemParam, P4: SystemParam> SystemParam for (P0, P1, P2, P3, P4)

Source§

type State = (<P0 as SystemParam>::State, <P1 as SystemParam>::State, <P2 as SystemParam>::State, <P3 as SystemParam>::State, <P4 as SystemParam>::State)

Source§

type Item<'w, 's> = (<P0 as SystemParam>::Item<'w, 's>, <P1 as SystemParam>::Item<'w, 's>, <P2 as SystemParam>::Item<'w, 's>, <P3 as SystemParam>::Item<'w, 's>, <P4 as SystemParam>::Item<'w, 's>)

Source§

fn init_state(_world: &mut World, _system_meta: &mut SystemMeta) -> Self::State

Source§

unsafe fn new_archetype( (P0, P1, P2, P3, P4): &mut Self::State, _archetype: &Archetype, _system_meta: &mut SystemMeta, )

Source§

fn apply( (P0, P1, P2, P3, P4): &mut Self::State, _system_meta: &SystemMeta, _world: &mut World, )

Source§

fn queue( (P0, P1, P2, P3, P4): &mut Self::State, _system_meta: &SystemMeta, _world: DeferredWorld<'_>, )

Source§

unsafe fn get_param<'w, 's>( state: &'s mut Self::State, _system_meta: &SystemMeta, _world: UnsafeWorldCell<'w>, _change_tick: Tick, ) -> Self::Item<'w, 's>

Source§

impl<P0: SystemParam, P1: SystemParam, P2: SystemParam, P3: SystemParam, P4: SystemParam, P5: SystemParam> SystemParam for (P0, P1, P2, P3, P4, P5)

Source§

type State = (<P0 as SystemParam>::State, <P1 as SystemParam>::State, <P2 as SystemParam>::State, <P3 as SystemParam>::State, <P4 as SystemParam>::State, <P5 as SystemParam>::State)

Source§

type Item<'w, 's> = (<P0 as SystemParam>::Item<'w, 's>, <P1 as SystemParam>::Item<'w, 's>, <P2 as SystemParam>::Item<'w, 's>, <P3 as SystemParam>::Item<'w, 's>, <P4 as SystemParam>::Item<'w, 's>, <P5 as SystemParam>::Item<'w, 's>)

Source§

fn init_state(_world: &mut World, _system_meta: &mut SystemMeta) -> Self::State

Source§

unsafe fn new_archetype( (P0, P1, P2, P3, P4, P5): &mut Self::State, _archetype: &Archetype, _system_meta: &mut SystemMeta, )

Source§

fn apply( (P0, P1, P2, P3, P4, P5): &mut Self::State, _system_meta: &SystemMeta, _world: &mut World, )

Source§

fn queue( (P0, P1, P2, P3, P4, P5): &mut Self::State, _system_meta: &SystemMeta, _world: DeferredWorld<'_>, )

Source§

unsafe fn get_param<'w, 's>( state: &'s mut Self::State, _system_meta: &SystemMeta, _world: UnsafeWorldCell<'w>, _change_tick: Tick, ) -> Self::Item<'w, 's>

Source§

impl<P0: SystemParam, P1: SystemParam, P2: SystemParam, P3: SystemParam, P4: SystemParam, P5: SystemParam, P6: SystemParam> SystemParam for (P0, P1, P2, P3, P4, P5, P6)

Source§

type State = (<P0 as SystemParam>::State, <P1 as SystemParam>::State, <P2 as SystemParam>::State, <P3 as SystemParam>::State, <P4 as SystemParam>::State, <P5 as SystemParam>::State, <P6 as SystemParam>::State)

Source§

type Item<'w, 's> = (<P0 as SystemParam>::Item<'w, 's>, <P1 as SystemParam>::Item<'w, 's>, <P2 as SystemParam>::Item<'w, 's>, <P3 as SystemParam>::Item<'w, 's>, <P4 as SystemParam>::Item<'w, 's>, <P5 as SystemParam>::Item<'w, 's>, <P6 as SystemParam>::Item<'w, 's>)

Source§

fn init_state(_world: &mut World, _system_meta: &mut SystemMeta) -> Self::State

Source§

unsafe fn new_archetype( (P0, P1, P2, P3, P4, P5, P6): &mut Self::State, _archetype: &Archetype, _system_meta: &mut SystemMeta, )

Source§

fn apply( (P0, P1, P2, P3, P4, P5, P6): &mut Self::State, _system_meta: &SystemMeta, _world: &mut World, )

Source§

fn queue( (P0, P1, P2, P3, P4, P5, P6): &mut Self::State, _system_meta: &SystemMeta, _world: DeferredWorld<'_>, )

Source§

unsafe fn get_param<'w, 's>( state: &'s mut Self::State, _system_meta: &SystemMeta, _world: UnsafeWorldCell<'w>, _change_tick: Tick, ) -> Self::Item<'w, 's>

Source§

impl<P0: SystemParam, P1: SystemParam, P2: SystemParam, P3: SystemParam, P4: SystemParam, P5: SystemParam, P6: SystemParam, P7: SystemParam> SystemParam for (P0, P1, P2, P3, P4, P5, P6, P7)

Source§

type State = (<P0 as SystemParam>::State, <P1 as SystemParam>::State, <P2 as SystemParam>::State, <P3 as SystemParam>::State, <P4 as SystemParam>::State, <P5 as SystemParam>::State, <P6 as SystemParam>::State, <P7 as SystemParam>::State)

Source§

type Item<'w, 's> = (<P0 as SystemParam>::Item<'w, 's>, <P1 as SystemParam>::Item<'w, 's>, <P2 as SystemParam>::Item<'w, 's>, <P3 as SystemParam>::Item<'w, 's>, <P4 as SystemParam>::Item<'w, 's>, <P5 as SystemParam>::Item<'w, 's>, <P6 as SystemParam>::Item<'w, 's>, <P7 as SystemParam>::Item<'w, 's>)

Source§

fn init_state(_world: &mut World, _system_meta: &mut SystemMeta) -> Self::State

Source§

unsafe fn new_archetype( (P0, P1, P2, P3, P4, P5, P6, P7): &mut Self::State, _archetype: &Archetype, _system_meta: &mut SystemMeta, )

Source§

fn apply( (P0, P1, P2, P3, P4, P5, P6, P7): &mut Self::State, _system_meta: &SystemMeta, _world: &mut World, )

Source§

fn queue( (P0, P1, P2, P3, P4, P5, P6, P7): &mut Self::State, _system_meta: &SystemMeta, _world: DeferredWorld<'_>, )

Source§

unsafe fn get_param<'w, 's>( state: &'s mut Self::State, _system_meta: &SystemMeta, _world: UnsafeWorldCell<'w>, _change_tick: Tick, ) -> Self::Item<'w, 's>

Source§

impl<P0: SystemParam, P1: SystemParam, P2: SystemParam, P3: SystemParam, P4: SystemParam, P5: SystemParam, P6: SystemParam, P7: SystemParam, P8: SystemParam> SystemParam for (P0, P1, P2, P3, P4, P5, P6, P7, P8)

Source§

type State = (<P0 as SystemParam>::State, <P1 as SystemParam>::State, <P2 as SystemParam>::State, <P3 as SystemParam>::State, <P4 as SystemParam>::State, <P5 as SystemParam>::State, <P6 as SystemParam>::State, <P7 as SystemParam>::State, <P8 as SystemParam>::State)

Source§

type Item<'w, 's> = (<P0 as SystemParam>::Item<'w, 's>, <P1 as SystemParam>::Item<'w, 's>, <P2 as SystemParam>::Item<'w, 's>, <P3 as SystemParam>::Item<'w, 's>, <P4 as SystemParam>::Item<'w, 's>, <P5 as SystemParam>::Item<'w, 's>, <P6 as SystemParam>::Item<'w, 's>, <P7 as SystemParam>::Item<'w, 's>, <P8 as SystemParam>::Item<'w, 's>)

Source§

fn init_state(_world: &mut World, _system_meta: &mut SystemMeta) -> Self::State

Source§

unsafe fn new_archetype( (P0, P1, P2, P3, P4, P5, P6, P7, P8): &mut Self::State, _archetype: &Archetype, _system_meta: &mut SystemMeta, )

Source§

fn apply( (P0, P1, P2, P3, P4, P5, P6, P7, P8): &mut Self::State, _system_meta: &SystemMeta, _world: &mut World, )

Source§

fn queue( (P0, P1, P2, P3, P4, P5, P6, P7, P8): &mut Self::State, _system_meta: &SystemMeta, _world: DeferredWorld<'_>, )

Source§

unsafe fn get_param<'w, 's>( state: &'s mut Self::State, _system_meta: &SystemMeta, _world: UnsafeWorldCell<'w>, _change_tick: Tick, ) -> Self::Item<'w, 's>

Source§

impl<P0: SystemParam, P1: SystemParam, P2: SystemParam, P3: SystemParam, P4: SystemParam, P5: SystemParam, P6: SystemParam, P7: SystemParam, P8: SystemParam, P9: SystemParam> SystemParam for (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9)

Source§

type State = (<P0 as SystemParam>::State, <P1 as SystemParam>::State, <P2 as SystemParam>::State, <P3 as SystemParam>::State, <P4 as SystemParam>::State, <P5 as SystemParam>::State, <P6 as SystemParam>::State, <P7 as SystemParam>::State, <P8 as SystemParam>::State, <P9 as SystemParam>::State)

Source§

type Item<'w, 's> = (<P0 as SystemParam>::Item<'w, 's>, <P1 as SystemParam>::Item<'w, 's>, <P2 as SystemParam>::Item<'w, 's>, <P3 as SystemParam>::Item<'w, 's>, <P4 as SystemParam>::Item<'w, 's>, <P5 as SystemParam>::Item<'w, 's>, <P6 as SystemParam>::Item<'w, 's>, <P7 as SystemParam>::Item<'w, 's>, <P8 as SystemParam>::Item<'w, 's>, <P9 as SystemParam>::Item<'w, 's>)

Source§

fn init_state(_world: &mut World, _system_meta: &mut SystemMeta) -> Self::State

Source§

unsafe fn new_archetype( (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9): &mut Self::State, _archetype: &Archetype, _system_meta: &mut SystemMeta, )

Source§

fn apply( (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9): &mut Self::State, _system_meta: &SystemMeta, _world: &mut World, )

Source§

fn queue( (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9): &mut Self::State, _system_meta: &SystemMeta, _world: DeferredWorld<'_>, )

Source§

unsafe fn get_param<'w, 's>( state: &'s mut Self::State, _system_meta: &SystemMeta, _world: UnsafeWorldCell<'w>, _change_tick: Tick, ) -> Self::Item<'w, 's>

Source§

impl<P0: SystemParam, P1: SystemParam, P2: SystemParam, P3: SystemParam, P4: SystemParam, P5: SystemParam, P6: SystemParam, P7: SystemParam, P8: SystemParam, P9: SystemParam, P10: SystemParam> SystemParam for (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10)

Source§

type State = (<P0 as SystemParam>::State, <P1 as SystemParam>::State, <P2 as SystemParam>::State, <P3 as SystemParam>::State, <P4 as SystemParam>::State, <P5 as SystemParam>::State, <P6 as SystemParam>::State, <P7 as SystemParam>::State, <P8 as SystemParam>::State, <P9 as SystemParam>::State, <P10 as SystemParam>::State)

Source§

type Item<'w, 's> = (<P0 as SystemParam>::Item<'w, 's>, <P1 as SystemParam>::Item<'w, 's>, <P2 as SystemParam>::Item<'w, 's>, <P3 as SystemParam>::Item<'w, 's>, <P4 as SystemParam>::Item<'w, 's>, <P5 as SystemParam>::Item<'w, 's>, <P6 as SystemParam>::Item<'w, 's>, <P7 as SystemParam>::Item<'w, 's>, <P8 as SystemParam>::Item<'w, 's>, <P9 as SystemParam>::Item<'w, 's>, <P10 as SystemParam>::Item<'w, 's>)

Source§

fn init_state(_world: &mut World, _system_meta: &mut SystemMeta) -> Self::State

Source§

unsafe fn new_archetype( (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10): &mut Self::State, _archetype: &Archetype, _system_meta: &mut SystemMeta, )

Source§

fn apply( (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10): &mut Self::State, _system_meta: &SystemMeta, _world: &mut World, )

Source§

fn queue( (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10): &mut Self::State, _system_meta: &SystemMeta, _world: DeferredWorld<'_>, )

Source§

unsafe fn get_param<'w, 's>( state: &'s mut Self::State, _system_meta: &SystemMeta, _world: UnsafeWorldCell<'w>, _change_tick: Tick, ) -> Self::Item<'w, 's>

Source§

impl<P0: SystemParam, P1: SystemParam, P2: SystemParam, P3: SystemParam, P4: SystemParam, P5: SystemParam, P6: SystemParam, P7: SystemParam, P8: SystemParam, P9: SystemParam, P10: SystemParam, P11: SystemParam> SystemParam for (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11)

Source§

type State = (<P0 as SystemParam>::State, <P1 as SystemParam>::State, <P2 as SystemParam>::State, <P3 as SystemParam>::State, <P4 as SystemParam>::State, <P5 as SystemParam>::State, <P6 as SystemParam>::State, <P7 as SystemParam>::State, <P8 as SystemParam>::State, <P9 as SystemParam>::State, <P10 as SystemParam>::State, <P11 as SystemParam>::State)

Source§

type Item<'w, 's> = (<P0 as SystemParam>::Item<'w, 's>, <P1 as SystemParam>::Item<'w, 's>, <P2 as SystemParam>::Item<'w, 's>, <P3 as SystemParam>::Item<'w, 's>, <P4 as SystemParam>::Item<'w, 's>, <P5 as SystemParam>::Item<'w, 's>, <P6 as SystemParam>::Item<'w, 's>, <P7 as SystemParam>::Item<'w, 's>, <P8 as SystemParam>::Item<'w, 's>, <P9 as SystemParam>::Item<'w, 's>, <P10 as SystemParam>::Item<'w, 's>, <P11 as SystemParam>::Item<'w, 's>)

Source§

fn init_state(_world: &mut World, _system_meta: &mut SystemMeta) -> Self::State

Source§

unsafe fn new_archetype( (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11): &mut Self::State, _archetype: &Archetype, _system_meta: &mut SystemMeta, )

Source§

fn apply( (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11): &mut Self::State, _system_meta: &SystemMeta, _world: &mut World, )

Source§

fn queue( (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11): &mut Self::State, _system_meta: &SystemMeta, _world: DeferredWorld<'_>, )

Source§

unsafe fn get_param<'w, 's>( state: &'s mut Self::State, _system_meta: &SystemMeta, _world: UnsafeWorldCell<'w>, _change_tick: Tick, ) -> Self::Item<'w, 's>

Source§

impl<P0: SystemParam, P1: SystemParam, P2: SystemParam, P3: SystemParam, P4: SystemParam, P5: SystemParam, P6: SystemParam, P7: SystemParam, P8: SystemParam, P9: SystemParam, P10: SystemParam, P11: SystemParam, P12: SystemParam> SystemParam for (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12)

Source§

type State = (<P0 as SystemParam>::State, <P1 as SystemParam>::State, <P2 as SystemParam>::State, <P3 as SystemParam>::State, <P4 as SystemParam>::State, <P5 as SystemParam>::State, <P6 as SystemParam>::State, <P7 as SystemParam>::State, <P8 as SystemParam>::State, <P9 as SystemParam>::State, <P10 as SystemParam>::State, <P11 as SystemParam>::State, <P12 as SystemParam>::State)

Source§

type Item<'w, 's> = (<P0 as SystemParam>::Item<'w, 's>, <P1 as SystemParam>::Item<'w, 's>, <P2 as SystemParam>::Item<'w, 's>, <P3 as SystemParam>::Item<'w, 's>, <P4 as SystemParam>::Item<'w, 's>, <P5 as SystemParam>::Item<'w, 's>, <P6 as SystemParam>::Item<'w, 's>, <P7 as SystemParam>::Item<'w, 's>, <P8 as SystemParam>::Item<'w, 's>, <P9 as SystemParam>::Item<'w, 's>, <P10 as SystemParam>::Item<'w, 's>, <P11 as SystemParam>::Item<'w, 's>, <P12 as SystemParam>::Item<'w, 's>)

Source§

fn init_state(_world: &mut World, _system_meta: &mut SystemMeta) -> Self::State

Source§

unsafe fn new_archetype( (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12): &mut Self::State, _archetype: &Archetype, _system_meta: &mut SystemMeta, )

Source§

fn apply( (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12): &mut Self::State, _system_meta: &SystemMeta, _world: &mut World, )

Source§

fn queue( (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12): &mut Self::State, _system_meta: &SystemMeta, _world: DeferredWorld<'_>, )

Source§

unsafe fn get_param<'w, 's>( state: &'s mut Self::State, _system_meta: &SystemMeta, _world: UnsafeWorldCell<'w>, _change_tick: Tick, ) -> Self::Item<'w, 's>

Source§

impl<P0: SystemParam, P1: SystemParam, P2: SystemParam, P3: SystemParam, P4: SystemParam, P5: SystemParam, P6: SystemParam, P7: SystemParam, P8: SystemParam, P9: SystemParam, P10: SystemParam, P11: SystemParam, P12: SystemParam, P13: SystemParam> SystemParam for (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13)

Source§

type State = (<P0 as SystemParam>::State, <P1 as SystemParam>::State, <P2 as SystemParam>::State, <P3 as SystemParam>::State, <P4 as SystemParam>::State, <P5 as SystemParam>::State, <P6 as SystemParam>::State, <P7 as SystemParam>::State, <P8 as SystemParam>::State, <P9 as SystemParam>::State, <P10 as SystemParam>::State, <P11 as SystemParam>::State, <P12 as SystemParam>::State, <P13 as SystemParam>::State)

Source§

type Item<'w, 's> = (<P0 as SystemParam>::Item<'w, 's>, <P1 as SystemParam>::Item<'w, 's>, <P2 as SystemParam>::Item<'w, 's>, <P3 as SystemParam>::Item<'w, 's>, <P4 as SystemParam>::Item<'w, 's>, <P5 as SystemParam>::Item<'w, 's>, <P6 as SystemParam>::Item<'w, 's>, <P7 as SystemParam>::Item<'w, 's>, <P8 as SystemParam>::Item<'w, 's>, <P9 as SystemParam>::Item<'w, 's>, <P10 as SystemParam>::Item<'w, 's>, <P11 as SystemParam>::Item<'w, 's>, <P12 as SystemParam>::Item<'w, 's>, <P13 as SystemParam>::Item<'w, 's>)

Source§

fn init_state(_world: &mut World, _system_meta: &mut SystemMeta) -> Self::State

Source§

unsafe fn new_archetype( (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13): &mut Self::State, _archetype: &Archetype, _system_meta: &mut SystemMeta, )

Source§

fn apply( (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13): &mut Self::State, _system_meta: &SystemMeta, _world: &mut World, )

Source§

fn queue( (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13): &mut Self::State, _system_meta: &SystemMeta, _world: DeferredWorld<'_>, )

Source§

unsafe fn get_param<'w, 's>( state: &'s mut Self::State, _system_meta: &SystemMeta, _world: UnsafeWorldCell<'w>, _change_tick: Tick, ) -> Self::Item<'w, 's>

Source§

impl<P0: SystemParam, P1: SystemParam, P2: SystemParam, P3: SystemParam, P4: SystemParam, P5: SystemParam, P6: SystemParam, P7: SystemParam, P8: SystemParam, P9: SystemParam, P10: SystemParam, P11: SystemParam, P12: SystemParam, P13: SystemParam, P14: SystemParam> SystemParam for (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14)

Source§

type State = (<P0 as SystemParam>::State, <P1 as SystemParam>::State, <P2 as SystemParam>::State, <P3 as SystemParam>::State, <P4 as SystemParam>::State, <P5 as SystemParam>::State, <P6 as SystemParam>::State, <P7 as SystemParam>::State, <P8 as SystemParam>::State, <P9 as SystemParam>::State, <P10 as SystemParam>::State, <P11 as SystemParam>::State, <P12 as SystemParam>::State, <P13 as SystemParam>::State, <P14 as SystemParam>::State)

Source§

type Item<'w, 's> = (<P0 as SystemParam>::Item<'w, 's>, <P1 as SystemParam>::Item<'w, 's>, <P2 as SystemParam>::Item<'w, 's>, <P3 as SystemParam>::Item<'w, 's>, <P4 as SystemParam>::Item<'w, 's>, <P5 as SystemParam>::Item<'w, 's>, <P6 as SystemParam>::Item<'w, 's>, <P7 as SystemParam>::Item<'w, 's>, <P8 as SystemParam>::Item<'w, 's>, <P9 as SystemParam>::Item<'w, 's>, <P10 as SystemParam>::Item<'w, 's>, <P11 as SystemParam>::Item<'w, 's>, <P12 as SystemParam>::Item<'w, 's>, <P13 as SystemParam>::Item<'w, 's>, <P14 as SystemParam>::Item<'w, 's>)

Source§

fn init_state(_world: &mut World, _system_meta: &mut SystemMeta) -> Self::State

Source§

unsafe fn new_archetype( (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14): &mut Self::State, _archetype: &Archetype, _system_meta: &mut SystemMeta, )

Source§

fn apply( (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14): &mut Self::State, _system_meta: &SystemMeta, _world: &mut World, )

Source§

fn queue( (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14): &mut Self::State, _system_meta: &SystemMeta, _world: DeferredWorld<'_>, )

Source§

unsafe fn get_param<'w, 's>( state: &'s mut Self::State, _system_meta: &SystemMeta, _world: UnsafeWorldCell<'w>, _change_tick: Tick, ) -> Self::Item<'w, 's>

Source§

impl<P0: SystemParam, P1: SystemParam, P2: SystemParam, P3: SystemParam, P4: SystemParam, P5: SystemParam, P6: SystemParam, P7: SystemParam, P8: SystemParam, P9: SystemParam, P10: SystemParam, P11: SystemParam, P12: SystemParam, P13: SystemParam, P14: SystemParam, P15: SystemParam> SystemParam for (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15)

Source§

type State = (<P0 as SystemParam>::State, <P1 as SystemParam>::State, <P2 as SystemParam>::State, <P3 as SystemParam>::State, <P4 as SystemParam>::State, <P5 as SystemParam>::State, <P6 as SystemParam>::State, <P7 as SystemParam>::State, <P8 as SystemParam>::State, <P9 as SystemParam>::State, <P10 as SystemParam>::State, <P11 as SystemParam>::State, <P12 as SystemParam>::State, <P13 as SystemParam>::State, <P14 as SystemParam>::State, <P15 as SystemParam>::State)

Source§

type Item<'w, 's> = (<P0 as SystemParam>::Item<'w, 's>, <P1 as SystemParam>::Item<'w, 's>, <P2 as SystemParam>::Item<'w, 's>, <P3 as SystemParam>::Item<'w, 's>, <P4 as SystemParam>::Item<'w, 's>, <P5 as SystemParam>::Item<'w, 's>, <P6 as SystemParam>::Item<'w, 's>, <P7 as SystemParam>::Item<'w, 's>, <P8 as SystemParam>::Item<'w, 's>, <P9 as SystemParam>::Item<'w, 's>, <P10 as SystemParam>::Item<'w, 's>, <P11 as SystemParam>::Item<'w, 's>, <P12 as SystemParam>::Item<'w, 's>, <P13 as SystemParam>::Item<'w, 's>, <P14 as SystemParam>::Item<'w, 's>, <P15 as SystemParam>::Item<'w, 's>)

Source§

fn init_state(_world: &mut World, _system_meta: &mut SystemMeta) -> Self::State

Source§

unsafe fn new_archetype( (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15): &mut Self::State, _archetype: &Archetype, _system_meta: &mut SystemMeta, )

Source§

fn apply( (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15): &mut Self::State, _system_meta: &SystemMeta, _world: &mut World, )

Source§

fn queue( (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15): &mut Self::State, _system_meta: &SystemMeta, _world: DeferredWorld<'_>, )

Source§

unsafe fn get_param<'w, 's>( state: &'s mut Self::State, _system_meta: &SystemMeta, _world: UnsafeWorldCell<'w>, _change_tick: Tick, ) -> Self::Item<'w, 's>

Source§

impl<T: 'static> SystemParam for Option<NonSend<'_, T>>

Source§

type State = ComponentId

Source§

type Item<'w, 's> = Option<NonSend<'w, T>>

Source§

fn init_state(world: &mut World, system_meta: &mut SystemMeta) -> Self::State

Source§

unsafe fn get_param<'w, 's>( component_id: &'s mut Self::State, system_meta: &SystemMeta, world: UnsafeWorldCell<'w>, change_tick: Tick, ) -> Self::Item<'w, 's>

Source§

impl<T: ?Sized> SystemParam for PhantomData<T>

Source§

type State = ()

Source§

type Item<'world, 'state> = PhantomData<T>

Source§

fn init_state(_world: &mut World, _system_meta: &mut SystemMeta) -> Self::State

Source§

unsafe fn get_param<'world, 'state>( _state: &'state mut Self::State, _system_meta: &SystemMeta, _world: UnsafeWorldCell<'world>, _change_tick: Tick, ) -> Self::Item<'world, 'state>

Implementors§

Source§

impl SystemParam for &World

Source§

type State = ()

Source§

type Item<'w, 's> = &'w World

Source§

impl SystemParam for WorldId

Source§

type State = ()

Source§

type Item<'world, 'state> = WorldId

Source§

impl SystemParam for Commands<'_, '_>

Source§

type State = FetchState

Source§

type Item<'w, 's> = Commands<'w, 's>

Source§

impl SystemParam for ParallelCommands<'_, '_>

Source§

type State = FetchState

Source§

type Item<'w, 's> = ParallelCommands<'w, 's>

Source§

impl SystemParam for SystemChangeTick

Source§

impl SystemParam for SystemName<'_>

Source§

type State = Cow<'static, str>

Source§

type Item<'w, 's> = SystemName<'s>

Source§

impl<'_w, '_s, P0: SystemParam> SystemParam for ParamSet<'_w, '_s, (P0,)>

Source§

type State = (<P0 as SystemParam>::State,)

Source§

type Item<'w, 's> = ParamSet<'w, 's, (P0,)>

Source§

impl<'_w, '_s, P0: SystemParam, P1: SystemParam> SystemParam for ParamSet<'_w, '_s, (P0, P1)>

Source§

type State = (<P0 as SystemParam>::State, <P1 as SystemParam>::State)

Source§

type Item<'w, 's> = ParamSet<'w, 's, (P0, P1)>

Source§

impl<'_w, '_s, P0: SystemParam, P1: SystemParam, P2: SystemParam> SystemParam for ParamSet<'_w, '_s, (P0, P1, P2)>

Source§

type State = (<P0 as SystemParam>::State, <P1 as SystemParam>::State, <P2 as SystemParam>::State)

Source§

type Item<'w, 's> = ParamSet<'w, 's, (P0, P1, P2)>

Source§

impl<'_w, '_s, P0: SystemParam, P1: SystemParam, P2: SystemParam, P3: SystemParam> SystemParam for ParamSet<'_w, '_s, (P0, P1, P2, P3)>

Source§

type State = (<P0 as SystemParam>::State, <P1 as SystemParam>::State, <P2 as SystemParam>::State, <P3 as SystemParam>::State)

Source§

type Item<'w, 's> = ParamSet<'w, 's, (P0, P1, P2, P3)>

Source§

impl<'_w, '_s, P0: SystemParam, P1: SystemParam, P2: SystemParam, P3: SystemParam, P4: SystemParam> SystemParam for ParamSet<'_w, '_s, (P0, P1, P2, P3, P4)>

Source§

type State = (<P0 as SystemParam>::State, <P1 as SystemParam>::State, <P2 as SystemParam>::State, <P3 as SystemParam>::State, <P4 as SystemParam>::State)

Source§

type Item<'w, 's> = ParamSet<'w, 's, (P0, P1, P2, P3, P4)>

Source§

impl<'_w, '_s, P0: SystemParam, P1: SystemParam, P2: SystemParam, P3: SystemParam, P4: SystemParam, P5: SystemParam> SystemParam for ParamSet<'_w, '_s, (P0, P1, P2, P3, P4, P5)>

Source§

type State = (<P0 as SystemParam>::State, <P1 as SystemParam>::State, <P2 as SystemParam>::State, <P3 as SystemParam>::State, <P4 as SystemParam>::State, <P5 as SystemParam>::State)

Source§

type Item<'w, 's> = ParamSet<'w, 's, (P0, P1, P2, P3, P4, P5)>

Source§

impl<'_w, '_s, P0: SystemParam, P1: SystemParam, P2: SystemParam, P3: SystemParam, P4: SystemParam, P5: SystemParam, P6: SystemParam> SystemParam for ParamSet<'_w, '_s, (P0, P1, P2, P3, P4, P5, P6)>

Source§

type State = (<P0 as SystemParam>::State, <P1 as SystemParam>::State, <P2 as SystemParam>::State, <P3 as SystemParam>::State, <P4 as SystemParam>::State, <P5 as SystemParam>::State, <P6 as SystemParam>::State)

Source§

type Item<'w, 's> = ParamSet<'w, 's, (P0, P1, P2, P3, P4, P5, P6)>

Source§

impl<'_w, '_s, P0: SystemParam, P1: SystemParam, P2: SystemParam, P3: SystemParam, P4: SystemParam, P5: SystemParam, P6: SystemParam, P7: SystemParam> SystemParam for ParamSet<'_w, '_s, (P0, P1, P2, P3, P4, P5, P6, P7)>

Source§

type State = (<P0 as SystemParam>::State, <P1 as SystemParam>::State, <P2 as SystemParam>::State, <P3 as SystemParam>::State, <P4 as SystemParam>::State, <P5 as SystemParam>::State, <P6 as SystemParam>::State, <P7 as SystemParam>::State)

Source§

type Item<'w, 's> = ParamSet<'w, 's, (P0, P1, P2, P3, P4, P5, P6, P7)>

Source§

impl<'a> SystemParam for &'a Archetypes

Source§

type State = ()

Source§

type Item<'w, 's> = &'w Archetypes

Source§

impl<'a> SystemParam for &'a Bundles

Source§

type State = ()

Source§

type Item<'w, 's> = &'w Bundles

Source§

impl<'a> SystemParam for &'a Components

Source§

type State = ()

Source§

type Item<'w, 's> = &'w Components

Source§

impl<'a> SystemParam for &'a Entities

Source§

type State = ()

Source§

type Item<'w, 's> = &'w Entities

Source§

impl<'a> SystemParam for &'a RemovedComponentEvents

Source§

impl<'a, T: 'static> SystemParam for NonSendMut<'a, T>

Source§

type State = ComponentId

Source§

type Item<'w, 's> = NonSendMut<'w, T>

Source§

impl<'a, T: 'static> SystemParam for NonSend<'a, T>

Source§

type State = ComponentId

Source§

type Item<'w, 's> = NonSend<'w, T>

Source§

impl<'a, T: FromWorld + Send + 'static> SystemParam for Local<'a, T>

Source§

type State = SyncCell<T>

Source§

type Item<'w, 's> = Local<'s, T>

Source§

impl<'a, T: Resource> SystemParam for Res<'a, T>

Source§

type State = ComponentId

Source§

type Item<'w, 's> = Res<'w, T>

Source§

impl<'a, T: Resource> SystemParam for ResMut<'a, T>

Source§

type State = ComponentId

Source§

type Item<'w, 's> = ResMut<'w, T>

Source§

impl<'w> SystemParam for DeferredWorld<'w>

SAFETY: DeferredWorld can read all components and resources but cannot be used to gain any other mutable references.

Source§

type State = ()

Source§

type Item<'world, 'state> = DeferredWorld<'world>

Source§

impl<D: QueryData + 'static, F: QueryFilter + 'static> SystemParam for Query<'_, '_, D, F>

Source§

type State = QueryState<D, F>

Source§

type Item<'w, 's> = Query<'w, 's, D, F>

Source§

impl<E: Event> SystemParam for EventReader<'_, '_, E>

Source§

type State = FetchState<E>

Source§

type Item<'w, 's> = EventReader<'w, 's, E>

Source§

impl<E: Event> SystemParam for EventWriter<'_, E>

Source§

type State = FetchState<E>

Source§

type Item<'w, 's> = EventWriter<'w, E>

Source§

impl<P: SystemParam + 'static> SystemParam for StaticSystemParam<'_, '_, P>

Source§

type State = <P as SystemParam>::State

Source§

type Item<'world, 'state> = StaticSystemParam<'world, 'state, P>

Source§

impl<T: Component> SystemParam for ComponentIdFor<'_, T>

Source§

type State = FetchState<T>

Source§

type Item<'w, 's> = ComponentIdFor<'s, T>

Source§

impl<T: Component> SystemParam for RemovedComponents<'_, '_, T>

Source§

type State = FetchState<T>

Source§

type Item<'w, 's> = RemovedComponents<'w, 's, T>

Source§

impl<T: SystemBuffer> SystemParam for Deferred<'_, T>

Source§

type State = SyncCell<T>

Source§

type Item<'w, 's> = Deferred<'s, T>