Trait bevy::ecs::system::ExclusiveSystemParam

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§

type State: Send + Sync + 'static

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

type Item<'s>: ExclusiveSystemParam<State = Self::State>

The item type returned when constructing this system param. See SystemParam::Item.

Required Methods§

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

Creates a new instance of this param’s State.

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.

Implementations on Foreign Types§

§

impl ExclusiveSystemParam for ()

§

type State = ()

§

type Item<'s> = ()

§

fn init( _world: &mut World, _system_meta: &mut SystemMeta, ) -> <() as ExclusiveSystemParam>::State

§

fn get_param<'s>( state: &'s mut <() as ExclusiveSystemParam>::State, system_meta: &SystemMeta, ) -> <() as ExclusiveSystemParam>::Item<'s>

§

impl<P0> ExclusiveSystemParam for (P0,)

§

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

§

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

§

fn init( _world: &mut World, _system_meta: &mut SystemMeta, ) -> <(P0,) as ExclusiveSystemParam>::State

§

fn get_param<'s>( state: &'s mut <(P0,) as ExclusiveSystemParam>::State, system_meta: &SystemMeta, ) -> <(P0,) as ExclusiveSystemParam>::Item<'s>

§

impl<P0, P1> ExclusiveSystemParam for (P0, P1)

§

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

§

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

§

fn init( _world: &mut World, _system_meta: &mut SystemMeta, ) -> <(P0, P1) as ExclusiveSystemParam>::State

§

fn get_param<'s>( state: &'s mut <(P0, P1) as ExclusiveSystemParam>::State, system_meta: &SystemMeta, ) -> <(P0, P1) as ExclusiveSystemParam>::Item<'s>

§

impl<P0, P1, P2> ExclusiveSystemParam for (P0, P1, P2)

§

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

§

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

§

fn init( _world: &mut World, _system_meta: &mut SystemMeta, ) -> <(P0, P1, P2) as ExclusiveSystemParam>::State

§

fn get_param<'s>( state: &'s mut <(P0, P1, P2) as ExclusiveSystemParam>::State, system_meta: &SystemMeta, ) -> <(P0, P1, P2) as ExclusiveSystemParam>::Item<'s>

§

impl<P0, P1, P2, P3> ExclusiveSystemParam for (P0, P1, P2, P3)

§

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

§

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

§

fn init( _world: &mut World, _system_meta: &mut SystemMeta, ) -> <(P0, P1, P2, P3) as ExclusiveSystemParam>::State

§

fn get_param<'s>( state: &'s mut <(P0, P1, P2, P3) as ExclusiveSystemParam>::State, system_meta: &SystemMeta, ) -> <(P0, P1, P2, P3) as ExclusiveSystemParam>::Item<'s>

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

fn init( _world: &mut World, _system_meta: &mut SystemMeta, ) -> <(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) as ExclusiveSystemParam>::State

§

fn get_param<'s>( state: &'s mut <(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) as ExclusiveSystemParam>::State, system_meta: &SystemMeta, ) -> <(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) as ExclusiveSystemParam>::Item<'s>

§

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

§

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

§

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

§

fn init( _world: &mut World, _system_meta: &mut SystemMeta, ) -> <(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) as ExclusiveSystemParam>::State

§

fn get_param<'s>( state: &'s mut <(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) as ExclusiveSystemParam>::State, system_meta: &SystemMeta, ) -> <(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) as ExclusiveSystemParam>::Item<'s>

§

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

§

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

§

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

§

fn init( _world: &mut World, _system_meta: &mut SystemMeta, ) -> <(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) as ExclusiveSystemParam>::State

§

fn get_param<'s>( state: &'s mut <(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) as ExclusiveSystemParam>::State, system_meta: &SystemMeta, ) -> <(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) as ExclusiveSystemParam>::Item<'s>

§

impl<S> ExclusiveSystemParam for PhantomData<S>
where S: ?Sized,

§

type State = ()

§

type Item<'s> = PhantomData<S>

§

fn init( _world: &mut World, _system_meta: &mut SystemMeta, ) -> <PhantomData<S> as ExclusiveSystemParam>::State

§

fn get_param<'s>( _state: &'s mut <PhantomData<S> as ExclusiveSystemParam>::State, _system_meta: &SystemMeta, ) -> <PhantomData<S> as ExclusiveSystemParam>::Item<'s>

Implementors§

§

impl ExclusiveSystemParam for WorldId

§

type State = WorldId

§

type Item<'s> = WorldId

§

impl ExclusiveSystemParam for SystemName<'_>

§

type State = Cow<'static, str>

§

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

§

impl<'_s, T> ExclusiveSystemParam for Local<'_s, T>
where T: FromWorld + Send + 'static,

§

type State = SyncCell<T>

§

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

§

impl<'a, D, F> ExclusiveSystemParam for &'a mut QueryState<D, F>
where D: QueryData + 'static, F: QueryFilter + 'static,

§

type State = QueryState<D, F>

§

type Item<'s> = &'s mut QueryState<D, F>

§

impl<'a, P> ExclusiveSystemParam for &'a mut SystemState<P>
where P: SystemParam + 'static,

§

type State = SystemState<P>

§

type Item<'s> = &'s mut SystemState<P>