pub struct SystemState<Param>where
Param: SystemParam + 'static,{ /* private fields */ }
Expand description
Holds on to persistent state required to drive SystemParam
for a System
.
This is a powerful and convenient tool for working with exclusive world access,
allowing you to fetch data from the World
as if you were running a System
.
However, simply calling world::run_system(my_system)
using a World::run_system
can be significantly simpler and ensures that change detection and command flushing work as expected.
Borrow-checking is handled for you, allowing you to mutably access multiple compatible system parameters at once,
and arbitrary system parameters (like MessageWriter
) can be conveniently fetched.
For an alternative approach to split mutable access to the world, see World::resource_scope
.
§Warning
SystemState
values created can be cached to improve performance,
and must be cached and reused in order for system parameters that rely on local state to work correctly.
These include:
Added
,Changed
andSpawned
query filtersLocal
variables that hold stateMessageReader
system parameters, which rely on aLocal
to track which messages have been seen
Note that this is automatically handled for you when using a World::run_system
.
§Example
Basic usage:
// Work directly on the `World`
let mut world = World::new();
world.init_resource::<Messages<MyMessage>>();
// Construct a `SystemState` struct, passing in a tuple of `SystemParam`
// as if you were writing an ordinary system.
let mut system_state: SystemState<(
MessageWriter<MyMessage>,
Option<ResMut<MyResource>>,
Query<&MyComponent>,
)> = SystemState::new(&mut world);
// Use system_state.get_mut(&mut world) and unpack your system parameters into variables!
// system_state.get(&world) provides read-only versions of your system parameters instead.
let (message_writer, maybe_resource, query) = system_state.get_mut(&mut world);
// If you are using `Commands`, you can choose when you want to apply them to the world.
// You need to manually call `.apply(world)` on the `SystemState` to apply them.
Caching:
#[derive(Resource)]
struct CachedSystemState {
message_state: SystemState<MessageReader<'static, 'static, MyMessage>>,
}
// Create and store a system state once
let mut world = World::new();
world.init_resource::<Messages<MyMessage>>();
let initial_state: SystemState<MessageReader<MyMessage>> = SystemState::new(&mut world);
// The system state is cached in a resource
world.insert_resource(CachedSystemState {
message_state: initial_state,
});
// Later, fetch the cached system state, saving on overhead
world.resource_scope(|world, mut cached_state: Mut<CachedSystemState>| {
let mut message_reader = cached_state.message_state.get_mut(world);
for message in message_reader.read() {
println!("Hello World!");
}
});
Exclusive System:
fn exclusive_system(world: &mut World, system_state: &mut SystemState<MessageReader<MyMessage>>) {
let mut message_reader = system_state.get_mut(world);
for message in message_reader.read() {
println!("Hello World!");
}
}
Implementations§
Source§impl SystemState<()>
impl SystemState<()>
Sourcepub fn build_system<InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut() -> InnerOut + SystemParamFunction<Marker, Param = (), In = (), Out = InnerOut>,
pub fn build_system<InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut() -> InnerOut + SystemParamFunction<Marker, Param = (), In = (), Out = InnerOut>,
Create a FunctionSystem
from a SystemState
.
This method signature allows type inference of closure parameters for a system with no input.
You can use SystemState::build_system_with_input()
if you have input, or SystemState::build_any_system()
if you don’t need type inference.
Sourcepub fn build_system_with_input<Input, InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
Input: SystemInput,
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(Input) -> InnerOut + SystemParamFunction<Marker, Param = (), In = Input, Out = InnerOut>,
pub fn build_system_with_input<Input, InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
Input: SystemInput,
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(Input) -> InnerOut + SystemParamFunction<Marker, Param = (), In = Input, Out = InnerOut>,
Create a FunctionSystem
from a SystemState
.
This method signature allows type inference of closure parameters for a system with input.
You can use SystemState::build_system()
if you have no input, or SystemState::build_any_system()
if you don’t need type inference.
Source§impl<P> SystemState<(P,)>where
P: SystemParam,
impl<P> SystemState<(P,)>where
P: SystemParam,
Sourcepub fn build_system<InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(<P as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P,), In = (), Out = InnerOut>,
pub fn build_system<InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(<P as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P,), In = (), Out = InnerOut>,
Create a FunctionSystem
from a SystemState
.
This method signature allows type inference of closure parameters for a system with no input.
You can use SystemState::build_system_with_input()
if you have input, or SystemState::build_any_system()
if you don’t need type inference.
Sourcepub fn build_system_with_input<Input, InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
Input: SystemInput,
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(Input, <P as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P,), In = Input, Out = InnerOut>,
pub fn build_system_with_input<Input, InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
Input: SystemInput,
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(Input, <P as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P,), In = Input, Out = InnerOut>,
Create a FunctionSystem
from a SystemState
.
This method signature allows type inference of closure parameters for a system with input.
You can use SystemState::build_system()
if you have no input, or SystemState::build_any_system()
if you don’t need type inference.
Source§impl<P0, P1> SystemState<(P0, P1)>where
P0: SystemParam,
P1: SystemParam,
impl<P0, P1> SystemState<(P0, P1)>where
P0: SystemParam,
P1: SystemParam,
Sourcepub fn build_system<InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(<P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1), In = (), Out = InnerOut>,
pub fn build_system<InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(<P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1), In = (), Out = InnerOut>,
Create a FunctionSystem
from a SystemState
.
This method signature allows type inference of closure parameters for a system with no input.
You can use SystemState::build_system_with_input()
if you have input, or SystemState::build_any_system()
if you don’t need type inference.
Sourcepub fn build_system_with_input<Input, InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
Input: SystemInput,
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(Input, <P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1), In = Input, Out = InnerOut>,
pub fn build_system_with_input<Input, InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
Input: SystemInput,
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(Input, <P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1), In = Input, Out = InnerOut>,
Create a FunctionSystem
from a SystemState
.
This method signature allows type inference of closure parameters for a system with input.
You can use SystemState::build_system()
if you have no input, or SystemState::build_any_system()
if you don’t need type inference.
Source§impl<P0, P1, P2> SystemState<(P0, P1, P2)>
impl<P0, P1, P2> SystemState<(P0, P1, P2)>
Sourcepub fn build_system<InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(<P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2), In = (), Out = InnerOut>,
pub fn build_system<InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(<P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2), In = (), Out = InnerOut>,
Create a FunctionSystem
from a SystemState
.
This method signature allows type inference of closure parameters for a system with no input.
You can use SystemState::build_system_with_input()
if you have input, or SystemState::build_any_system()
if you don’t need type inference.
Sourcepub fn build_system_with_input<Input, InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
Input: SystemInput,
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(Input, <P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2), In = Input, Out = InnerOut>,
pub fn build_system_with_input<Input, InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
Input: SystemInput,
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(Input, <P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2), In = Input, Out = InnerOut>,
Create a FunctionSystem
from a SystemState
.
This method signature allows type inference of closure parameters for a system with input.
You can use SystemState::build_system()
if you have no input, or SystemState::build_any_system()
if you don’t need type inference.
Source§impl<P0, P1, P2, P3> SystemState<(P0, P1, P2, P3)>
impl<P0, P1, P2, P3> SystemState<(P0, P1, P2, P3)>
Sourcepub fn build_system<InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(<P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3), In = (), Out = InnerOut>,
pub fn build_system<InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(<P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3), In = (), Out = InnerOut>,
Create a FunctionSystem
from a SystemState
.
This method signature allows type inference of closure parameters for a system with no input.
You can use SystemState::build_system_with_input()
if you have input, or SystemState::build_any_system()
if you don’t need type inference.
Sourcepub fn build_system_with_input<Input, InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
Input: SystemInput,
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(Input, <P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3), In = Input, Out = InnerOut>,
pub fn build_system_with_input<Input, InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
Input: SystemInput,
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(Input, <P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3), In = Input, Out = InnerOut>,
Create a FunctionSystem
from a SystemState
.
This method signature allows type inference of closure parameters for a system with input.
You can use SystemState::build_system()
if you have no input, or SystemState::build_any_system()
if you don’t need type inference.
Source§impl<P0, P1, P2, P3, P4> SystemState<(P0, P1, P2, P3, P4)>
impl<P0, P1, P2, P3, P4> SystemState<(P0, P1, P2, P3, P4)>
Sourcepub fn build_system<InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(<P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4), In = (), Out = InnerOut>,
pub fn build_system<InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(<P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4), In = (), Out = InnerOut>,
Create a FunctionSystem
from a SystemState
.
This method signature allows type inference of closure parameters for a system with no input.
You can use SystemState::build_system_with_input()
if you have input, or SystemState::build_any_system()
if you don’t need type inference.
Sourcepub fn build_system_with_input<Input, InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
Input: SystemInput,
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(Input, <P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4), In = Input, Out = InnerOut>,
pub fn build_system_with_input<Input, InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
Input: SystemInput,
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(Input, <P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4), In = Input, Out = InnerOut>,
Create a FunctionSystem
from a SystemState
.
This method signature allows type inference of closure parameters for a system with input.
You can use SystemState::build_system()
if you have no input, or SystemState::build_any_system()
if you don’t need type inference.
Source§impl<P0, P1, P2, P3, P4, P5> SystemState<(P0, P1, P2, P3, P4, P5)>where
P0: SystemParam,
P1: SystemParam,
P2: SystemParam,
P3: SystemParam,
P4: SystemParam,
P5: SystemParam,
impl<P0, P1, P2, P3, P4, P5> SystemState<(P0, P1, P2, P3, P4, P5)>where
P0: SystemParam,
P1: SystemParam,
P2: SystemParam,
P3: SystemParam,
P4: SystemParam,
P5: SystemParam,
Sourcepub fn build_system<InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(<P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>, <P5 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4, P5), In = (), Out = InnerOut>,
pub fn build_system<InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(<P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>, <P5 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4, P5), In = (), Out = InnerOut>,
Create a FunctionSystem
from a SystemState
.
This method signature allows type inference of closure parameters for a system with no input.
You can use SystemState::build_system_with_input()
if you have input, or SystemState::build_any_system()
if you don’t need type inference.
Sourcepub fn build_system_with_input<Input, InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
Input: SystemInput,
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(Input, <P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>, <P5 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4, P5), In = Input, Out = InnerOut>,
pub fn build_system_with_input<Input, InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
Input: SystemInput,
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(Input, <P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>, <P5 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4, P5), In = Input, Out = InnerOut>,
Create a FunctionSystem
from a SystemState
.
This method signature allows type inference of closure parameters for a system with input.
You can use SystemState::build_system()
if you have no input, or SystemState::build_any_system()
if you don’t need type inference.
Source§impl<P0, P1, P2, P3, P4, P5, P6> SystemState<(P0, P1, P2, P3, P4, P5, P6)>where
P0: SystemParam,
P1: SystemParam,
P2: SystemParam,
P3: SystemParam,
P4: SystemParam,
P5: SystemParam,
P6: SystemParam,
impl<P0, P1, P2, P3, P4, P5, P6> SystemState<(P0, P1, P2, P3, P4, P5, P6)>where
P0: SystemParam,
P1: SystemParam,
P2: SystemParam,
P3: SystemParam,
P4: SystemParam,
P5: SystemParam,
P6: SystemParam,
Sourcepub fn build_system<InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(<P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>, <P5 as SystemParam>::Item<'_, '_>, <P6 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4, P5, P6), In = (), Out = InnerOut>,
pub fn build_system<InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(<P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>, <P5 as SystemParam>::Item<'_, '_>, <P6 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4, P5, P6), In = (), Out = InnerOut>,
Create a FunctionSystem
from a SystemState
.
This method signature allows type inference of closure parameters for a system with no input.
You can use SystemState::build_system_with_input()
if you have input, or SystemState::build_any_system()
if you don’t need type inference.
Sourcepub fn build_system_with_input<Input, InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
Input: SystemInput,
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(Input, <P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>, <P5 as SystemParam>::Item<'_, '_>, <P6 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4, P5, P6), In = Input, Out = InnerOut>,
pub fn build_system_with_input<Input, InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
Input: SystemInput,
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(Input, <P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>, <P5 as SystemParam>::Item<'_, '_>, <P6 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4, P5, P6), In = Input, Out = InnerOut>,
Create a FunctionSystem
from a SystemState
.
This method signature allows type inference of closure parameters for a system with input.
You can use SystemState::build_system()
if you have no input, or SystemState::build_any_system()
if you don’t need type inference.
Source§impl<P0, P1, P2, P3, P4, P5, P6, P7> SystemState<(P0, P1, P2, P3, P4, P5, P6, P7)>where
P0: SystemParam,
P1: SystemParam,
P2: SystemParam,
P3: SystemParam,
P4: SystemParam,
P5: SystemParam,
P6: SystemParam,
P7: SystemParam,
impl<P0, P1, P2, P3, P4, P5, P6, P7> SystemState<(P0, P1, P2, P3, P4, P5, P6, P7)>where
P0: SystemParam,
P1: SystemParam,
P2: SystemParam,
P3: SystemParam,
P4: SystemParam,
P5: SystemParam,
P6: SystemParam,
P7: SystemParam,
Sourcepub fn build_system<InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(<P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>, <P5 as SystemParam>::Item<'_, '_>, <P6 as SystemParam>::Item<'_, '_>, <P7 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4, P5, P6, P7), In = (), Out = InnerOut>,
pub fn build_system<InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(<P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>, <P5 as SystemParam>::Item<'_, '_>, <P6 as SystemParam>::Item<'_, '_>, <P7 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4, P5, P6, P7), In = (), Out = InnerOut>,
Create a FunctionSystem
from a SystemState
.
This method signature allows type inference of closure parameters for a system with no input.
You can use SystemState::build_system_with_input()
if you have input, or SystemState::build_any_system()
if you don’t need type inference.
Sourcepub fn build_system_with_input<Input, InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
Input: SystemInput,
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(Input, <P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>, <P5 as SystemParam>::Item<'_, '_>, <P6 as SystemParam>::Item<'_, '_>, <P7 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4, P5, P6, P7), In = Input, Out = InnerOut>,
pub fn build_system_with_input<Input, InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
Input: SystemInput,
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(Input, <P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>, <P5 as SystemParam>::Item<'_, '_>, <P6 as SystemParam>::Item<'_, '_>, <P7 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4, P5, P6, P7), In = Input, Out = InnerOut>,
Create a FunctionSystem
from a SystemState
.
This method signature allows type inference of closure parameters for a system with input.
You can use SystemState::build_system()
if you have no input, or SystemState::build_any_system()
if you don’t need type inference.
Source§impl<P0, P1, P2, P3, P4, P5, P6, P7, P8> SystemState<(P0, P1, P2, P3, P4, P5, P6, P7, P8)>where
P0: SystemParam,
P1: SystemParam,
P2: SystemParam,
P3: SystemParam,
P4: SystemParam,
P5: SystemParam,
P6: SystemParam,
P7: SystemParam,
P8: SystemParam,
impl<P0, P1, P2, P3, P4, P5, P6, P7, P8> SystemState<(P0, P1, P2, P3, P4, P5, P6, P7, P8)>where
P0: SystemParam,
P1: SystemParam,
P2: SystemParam,
P3: SystemParam,
P4: SystemParam,
P5: SystemParam,
P6: SystemParam,
P7: SystemParam,
P8: SystemParam,
Sourcepub fn build_system<InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(<P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>, <P5 as SystemParam>::Item<'_, '_>, <P6 as SystemParam>::Item<'_, '_>, <P7 as SystemParam>::Item<'_, '_>, <P8 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4, P5, P6, P7, P8), In = (), Out = InnerOut>,
pub fn build_system<InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(<P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>, <P5 as SystemParam>::Item<'_, '_>, <P6 as SystemParam>::Item<'_, '_>, <P7 as SystemParam>::Item<'_, '_>, <P8 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4, P5, P6, P7, P8), In = (), Out = InnerOut>,
Create a FunctionSystem
from a SystemState
.
This method signature allows type inference of closure parameters for a system with no input.
You can use SystemState::build_system_with_input()
if you have input, or SystemState::build_any_system()
if you don’t need type inference.
Sourcepub fn build_system_with_input<Input, InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
Input: SystemInput,
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(Input, <P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>, <P5 as SystemParam>::Item<'_, '_>, <P6 as SystemParam>::Item<'_, '_>, <P7 as SystemParam>::Item<'_, '_>, <P8 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4, P5, P6, P7, P8), In = Input, Out = InnerOut>,
pub fn build_system_with_input<Input, InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
Input: SystemInput,
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(Input, <P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>, <P5 as SystemParam>::Item<'_, '_>, <P6 as SystemParam>::Item<'_, '_>, <P7 as SystemParam>::Item<'_, '_>, <P8 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4, P5, P6, P7, P8), In = Input, Out = InnerOut>,
Create a FunctionSystem
from a SystemState
.
This method signature allows type inference of closure parameters for a system with input.
You can use SystemState::build_system()
if you have no input, or SystemState::build_any_system()
if you don’t need type inference.
Source§impl<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9> SystemState<(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9)>where
P0: SystemParam,
P1: SystemParam,
P2: SystemParam,
P3: SystemParam,
P4: SystemParam,
P5: SystemParam,
P6: SystemParam,
P7: SystemParam,
P8: SystemParam,
P9: SystemParam,
impl<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9> SystemState<(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9)>where
P0: SystemParam,
P1: SystemParam,
P2: SystemParam,
P3: SystemParam,
P4: SystemParam,
P5: SystemParam,
P6: SystemParam,
P7: SystemParam,
P8: SystemParam,
P9: SystemParam,
Sourcepub fn build_system<InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(<P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>, <P5 as SystemParam>::Item<'_, '_>, <P6 as SystemParam>::Item<'_, '_>, <P7 as SystemParam>::Item<'_, '_>, <P8 as SystemParam>::Item<'_, '_>, <P9 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9), In = (), Out = InnerOut>,
pub fn build_system<InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(<P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>, <P5 as SystemParam>::Item<'_, '_>, <P6 as SystemParam>::Item<'_, '_>, <P7 as SystemParam>::Item<'_, '_>, <P8 as SystemParam>::Item<'_, '_>, <P9 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9), In = (), Out = InnerOut>,
Create a FunctionSystem
from a SystemState
.
This method signature allows type inference of closure parameters for a system with no input.
You can use SystemState::build_system_with_input()
if you have input, or SystemState::build_any_system()
if you don’t need type inference.
Sourcepub fn build_system_with_input<Input, InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
Input: SystemInput,
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(Input, <P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>, <P5 as SystemParam>::Item<'_, '_>, <P6 as SystemParam>::Item<'_, '_>, <P7 as SystemParam>::Item<'_, '_>, <P8 as SystemParam>::Item<'_, '_>, <P9 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9), In = Input, Out = InnerOut>,
pub fn build_system_with_input<Input, InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
Input: SystemInput,
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(Input, <P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>, <P5 as SystemParam>::Item<'_, '_>, <P6 as SystemParam>::Item<'_, '_>, <P7 as SystemParam>::Item<'_, '_>, <P8 as SystemParam>::Item<'_, '_>, <P9 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9), In = Input, Out = InnerOut>,
Create a FunctionSystem
from a SystemState
.
This method signature allows type inference of closure parameters for a system with input.
You can use SystemState::build_system()
if you have no input, or SystemState::build_any_system()
if you don’t need type inference.
Source§impl<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10> SystemState<(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10)>where
P0: SystemParam,
P1: SystemParam,
P2: SystemParam,
P3: SystemParam,
P4: SystemParam,
P5: SystemParam,
P6: SystemParam,
P7: SystemParam,
P8: SystemParam,
P9: SystemParam,
P10: SystemParam,
impl<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10> SystemState<(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10)>where
P0: SystemParam,
P1: SystemParam,
P2: SystemParam,
P3: SystemParam,
P4: SystemParam,
P5: SystemParam,
P6: SystemParam,
P7: SystemParam,
P8: SystemParam,
P9: SystemParam,
P10: SystemParam,
Sourcepub fn build_system<InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(<P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>, <P5 as SystemParam>::Item<'_, '_>, <P6 as SystemParam>::Item<'_, '_>, <P7 as SystemParam>::Item<'_, '_>, <P8 as SystemParam>::Item<'_, '_>, <P9 as SystemParam>::Item<'_, '_>, <P10 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10), In = (), Out = InnerOut>,
pub fn build_system<InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(<P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>, <P5 as SystemParam>::Item<'_, '_>, <P6 as SystemParam>::Item<'_, '_>, <P7 as SystemParam>::Item<'_, '_>, <P8 as SystemParam>::Item<'_, '_>, <P9 as SystemParam>::Item<'_, '_>, <P10 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10), In = (), Out = InnerOut>,
Create a FunctionSystem
from a SystemState
.
This method signature allows type inference of closure parameters for a system with no input.
You can use SystemState::build_system_with_input()
if you have input, or SystemState::build_any_system()
if you don’t need type inference.
Sourcepub fn build_system_with_input<Input, InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
Input: SystemInput,
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(Input, <P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>, <P5 as SystemParam>::Item<'_, '_>, <P6 as SystemParam>::Item<'_, '_>, <P7 as SystemParam>::Item<'_, '_>, <P8 as SystemParam>::Item<'_, '_>, <P9 as SystemParam>::Item<'_, '_>, <P10 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10), In = Input, Out = InnerOut>,
pub fn build_system_with_input<Input, InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
Input: SystemInput,
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(Input, <P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>, <P5 as SystemParam>::Item<'_, '_>, <P6 as SystemParam>::Item<'_, '_>, <P7 as SystemParam>::Item<'_, '_>, <P8 as SystemParam>::Item<'_, '_>, <P9 as SystemParam>::Item<'_, '_>, <P10 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10), In = Input, Out = InnerOut>,
Create a FunctionSystem
from a SystemState
.
This method signature allows type inference of closure parameters for a system with input.
You can use SystemState::build_system()
if you have no input, or SystemState::build_any_system()
if you don’t need type inference.
Source§impl<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11> SystemState<(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11)>where
P0: SystemParam,
P1: SystemParam,
P2: SystemParam,
P3: SystemParam,
P4: SystemParam,
P5: SystemParam,
P6: SystemParam,
P7: SystemParam,
P8: SystemParam,
P9: SystemParam,
P10: SystemParam,
P11: SystemParam,
impl<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11> SystemState<(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11)>where
P0: SystemParam,
P1: SystemParam,
P2: SystemParam,
P3: SystemParam,
P4: SystemParam,
P5: SystemParam,
P6: SystemParam,
P7: SystemParam,
P8: SystemParam,
P9: SystemParam,
P10: SystemParam,
P11: SystemParam,
Sourcepub fn build_system<InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(<P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>, <P5 as SystemParam>::Item<'_, '_>, <P6 as SystemParam>::Item<'_, '_>, <P7 as SystemParam>::Item<'_, '_>, <P8 as SystemParam>::Item<'_, '_>, <P9 as SystemParam>::Item<'_, '_>, <P10 as SystemParam>::Item<'_, '_>, <P11 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11), In = (), Out = InnerOut>,
pub fn build_system<InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(<P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>, <P5 as SystemParam>::Item<'_, '_>, <P6 as SystemParam>::Item<'_, '_>, <P7 as SystemParam>::Item<'_, '_>, <P8 as SystemParam>::Item<'_, '_>, <P9 as SystemParam>::Item<'_, '_>, <P10 as SystemParam>::Item<'_, '_>, <P11 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11), In = (), Out = InnerOut>,
Create a FunctionSystem
from a SystemState
.
This method signature allows type inference of closure parameters for a system with no input.
You can use SystemState::build_system_with_input()
if you have input, or SystemState::build_any_system()
if you don’t need type inference.
Sourcepub fn build_system_with_input<Input, InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
Input: SystemInput,
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(Input, <P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>, <P5 as SystemParam>::Item<'_, '_>, <P6 as SystemParam>::Item<'_, '_>, <P7 as SystemParam>::Item<'_, '_>, <P8 as SystemParam>::Item<'_, '_>, <P9 as SystemParam>::Item<'_, '_>, <P10 as SystemParam>::Item<'_, '_>, <P11 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11), In = Input, Out = InnerOut>,
pub fn build_system_with_input<Input, InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
Input: SystemInput,
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(Input, <P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>, <P5 as SystemParam>::Item<'_, '_>, <P6 as SystemParam>::Item<'_, '_>, <P7 as SystemParam>::Item<'_, '_>, <P8 as SystemParam>::Item<'_, '_>, <P9 as SystemParam>::Item<'_, '_>, <P10 as SystemParam>::Item<'_, '_>, <P11 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11), In = Input, Out = InnerOut>,
Create a FunctionSystem
from a SystemState
.
This method signature allows type inference of closure parameters for a system with input.
You can use SystemState::build_system()
if you have no input, or SystemState::build_any_system()
if you don’t need type inference.
Source§impl<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12> SystemState<(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12)>where
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,
impl<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12> SystemState<(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12)>where
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,
Sourcepub fn build_system<InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(<P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>, <P5 as SystemParam>::Item<'_, '_>, <P6 as SystemParam>::Item<'_, '_>, <P7 as SystemParam>::Item<'_, '_>, <P8 as SystemParam>::Item<'_, '_>, <P9 as SystemParam>::Item<'_, '_>, <P10 as SystemParam>::Item<'_, '_>, <P11 as SystemParam>::Item<'_, '_>, <P12 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12), In = (), Out = InnerOut>,
pub fn build_system<InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(<P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>, <P5 as SystemParam>::Item<'_, '_>, <P6 as SystemParam>::Item<'_, '_>, <P7 as SystemParam>::Item<'_, '_>, <P8 as SystemParam>::Item<'_, '_>, <P9 as SystemParam>::Item<'_, '_>, <P10 as SystemParam>::Item<'_, '_>, <P11 as SystemParam>::Item<'_, '_>, <P12 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12), In = (), Out = InnerOut>,
Create a FunctionSystem
from a SystemState
.
This method signature allows type inference of closure parameters for a system with no input.
You can use SystemState::build_system_with_input()
if you have input, or SystemState::build_any_system()
if you don’t need type inference.
Sourcepub fn build_system_with_input<Input, InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
Input: SystemInput,
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(Input, <P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>, <P5 as SystemParam>::Item<'_, '_>, <P6 as SystemParam>::Item<'_, '_>, <P7 as SystemParam>::Item<'_, '_>, <P8 as SystemParam>::Item<'_, '_>, <P9 as SystemParam>::Item<'_, '_>, <P10 as SystemParam>::Item<'_, '_>, <P11 as SystemParam>::Item<'_, '_>, <P12 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12), In = Input, Out = InnerOut>,
pub fn build_system_with_input<Input, InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
Input: SystemInput,
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(Input, <P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>, <P5 as SystemParam>::Item<'_, '_>, <P6 as SystemParam>::Item<'_, '_>, <P7 as SystemParam>::Item<'_, '_>, <P8 as SystemParam>::Item<'_, '_>, <P9 as SystemParam>::Item<'_, '_>, <P10 as SystemParam>::Item<'_, '_>, <P11 as SystemParam>::Item<'_, '_>, <P12 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12), In = Input, Out = InnerOut>,
Create a FunctionSystem
from a SystemState
.
This method signature allows type inference of closure parameters for a system with input.
You can use SystemState::build_system()
if you have no input, or SystemState::build_any_system()
if you don’t need type inference.
Source§impl<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13> SystemState<(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13)>where
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,
impl<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13> SystemState<(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13)>where
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,
Sourcepub fn build_system<InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(<P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>, <P5 as SystemParam>::Item<'_, '_>, <P6 as SystemParam>::Item<'_, '_>, <P7 as SystemParam>::Item<'_, '_>, <P8 as SystemParam>::Item<'_, '_>, <P9 as SystemParam>::Item<'_, '_>, <P10 as SystemParam>::Item<'_, '_>, <P11 as SystemParam>::Item<'_, '_>, <P12 as SystemParam>::Item<'_, '_>, <P13 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13), In = (), Out = InnerOut>,
pub fn build_system<InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(<P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>, <P5 as SystemParam>::Item<'_, '_>, <P6 as SystemParam>::Item<'_, '_>, <P7 as SystemParam>::Item<'_, '_>, <P8 as SystemParam>::Item<'_, '_>, <P9 as SystemParam>::Item<'_, '_>, <P10 as SystemParam>::Item<'_, '_>, <P11 as SystemParam>::Item<'_, '_>, <P12 as SystemParam>::Item<'_, '_>, <P13 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13), In = (), Out = InnerOut>,
Create a FunctionSystem
from a SystemState
.
This method signature allows type inference of closure parameters for a system with no input.
You can use SystemState::build_system_with_input()
if you have input, or SystemState::build_any_system()
if you don’t need type inference.
Sourcepub fn build_system_with_input<Input, InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
Input: SystemInput,
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(Input, <P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>, <P5 as SystemParam>::Item<'_, '_>, <P6 as SystemParam>::Item<'_, '_>, <P7 as SystemParam>::Item<'_, '_>, <P8 as SystemParam>::Item<'_, '_>, <P9 as SystemParam>::Item<'_, '_>, <P10 as SystemParam>::Item<'_, '_>, <P11 as SystemParam>::Item<'_, '_>, <P12 as SystemParam>::Item<'_, '_>, <P13 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13), In = Input, Out = InnerOut>,
pub fn build_system_with_input<Input, InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
Input: SystemInput,
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(Input, <P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>, <P5 as SystemParam>::Item<'_, '_>, <P6 as SystemParam>::Item<'_, '_>, <P7 as SystemParam>::Item<'_, '_>, <P8 as SystemParam>::Item<'_, '_>, <P9 as SystemParam>::Item<'_, '_>, <P10 as SystemParam>::Item<'_, '_>, <P11 as SystemParam>::Item<'_, '_>, <P12 as SystemParam>::Item<'_, '_>, <P13 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13), In = Input, Out = InnerOut>,
Create a FunctionSystem
from a SystemState
.
This method signature allows type inference of closure parameters for a system with input.
You can use SystemState::build_system()
if you have no input, or SystemState::build_any_system()
if you don’t need type inference.
Source§impl<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14> SystemState<(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14)>where
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,
impl<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14> SystemState<(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14)>where
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,
Sourcepub fn build_system<InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(<P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>, <P5 as SystemParam>::Item<'_, '_>, <P6 as SystemParam>::Item<'_, '_>, <P7 as SystemParam>::Item<'_, '_>, <P8 as SystemParam>::Item<'_, '_>, <P9 as SystemParam>::Item<'_, '_>, <P10 as SystemParam>::Item<'_, '_>, <P11 as SystemParam>::Item<'_, '_>, <P12 as SystemParam>::Item<'_, '_>, <P13 as SystemParam>::Item<'_, '_>, <P14 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14), In = (), Out = InnerOut>,
pub fn build_system<InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(<P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>, <P5 as SystemParam>::Item<'_, '_>, <P6 as SystemParam>::Item<'_, '_>, <P7 as SystemParam>::Item<'_, '_>, <P8 as SystemParam>::Item<'_, '_>, <P9 as SystemParam>::Item<'_, '_>, <P10 as SystemParam>::Item<'_, '_>, <P11 as SystemParam>::Item<'_, '_>, <P12 as SystemParam>::Item<'_, '_>, <P13 as SystemParam>::Item<'_, '_>, <P14 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14), In = (), Out = InnerOut>,
Create a FunctionSystem
from a SystemState
.
This method signature allows type inference of closure parameters for a system with no input.
You can use SystemState::build_system_with_input()
if you have input, or SystemState::build_any_system()
if you don’t need type inference.
Sourcepub fn build_system_with_input<Input, InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
Input: SystemInput,
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(Input, <P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>, <P5 as SystemParam>::Item<'_, '_>, <P6 as SystemParam>::Item<'_, '_>, <P7 as SystemParam>::Item<'_, '_>, <P8 as SystemParam>::Item<'_, '_>, <P9 as SystemParam>::Item<'_, '_>, <P10 as SystemParam>::Item<'_, '_>, <P11 as SystemParam>::Item<'_, '_>, <P12 as SystemParam>::Item<'_, '_>, <P13 as SystemParam>::Item<'_, '_>, <P14 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14), In = Input, Out = InnerOut>,
pub fn build_system_with_input<Input, InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
Input: SystemInput,
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(Input, <P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>, <P5 as SystemParam>::Item<'_, '_>, <P6 as SystemParam>::Item<'_, '_>, <P7 as SystemParam>::Item<'_, '_>, <P8 as SystemParam>::Item<'_, '_>, <P9 as SystemParam>::Item<'_, '_>, <P10 as SystemParam>::Item<'_, '_>, <P11 as SystemParam>::Item<'_, '_>, <P12 as SystemParam>::Item<'_, '_>, <P13 as SystemParam>::Item<'_, '_>, <P14 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14), In = Input, Out = InnerOut>,
Create a FunctionSystem
from a SystemState
.
This method signature allows type inference of closure parameters for a system with input.
You can use SystemState::build_system()
if you have no input, or SystemState::build_any_system()
if you don’t need type inference.
Source§impl<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15> SystemState<(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15)>where
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,
impl<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15> SystemState<(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15)>where
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,
Sourcepub fn build_system<InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(<P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>, <P5 as SystemParam>::Item<'_, '_>, <P6 as SystemParam>::Item<'_, '_>, <P7 as SystemParam>::Item<'_, '_>, <P8 as SystemParam>::Item<'_, '_>, <P9 as SystemParam>::Item<'_, '_>, <P10 as SystemParam>::Item<'_, '_>, <P11 as SystemParam>::Item<'_, '_>, <P12 as SystemParam>::Item<'_, '_>, <P13 as SystemParam>::Item<'_, '_>, <P14 as SystemParam>::Item<'_, '_>, <P15 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15), In = (), Out = InnerOut>,
pub fn build_system<InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(<P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>, <P5 as SystemParam>::Item<'_, '_>, <P6 as SystemParam>::Item<'_, '_>, <P7 as SystemParam>::Item<'_, '_>, <P8 as SystemParam>::Item<'_, '_>, <P9 as SystemParam>::Item<'_, '_>, <P10 as SystemParam>::Item<'_, '_>, <P11 as SystemParam>::Item<'_, '_>, <P12 as SystemParam>::Item<'_, '_>, <P13 as SystemParam>::Item<'_, '_>, <P14 as SystemParam>::Item<'_, '_>, <P15 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15), In = (), Out = InnerOut>,
Create a FunctionSystem
from a SystemState
.
This method signature allows type inference of closure parameters for a system with no input.
You can use SystemState::build_system_with_input()
if you have input, or SystemState::build_any_system()
if you don’t need type inference.
Sourcepub fn build_system_with_input<Input, InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
Input: SystemInput,
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(Input, <P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>, <P5 as SystemParam>::Item<'_, '_>, <P6 as SystemParam>::Item<'_, '_>, <P7 as SystemParam>::Item<'_, '_>, <P8 as SystemParam>::Item<'_, '_>, <P9 as SystemParam>::Item<'_, '_>, <P10 as SystemParam>::Item<'_, '_>, <P11 as SystemParam>::Item<'_, '_>, <P12 as SystemParam>::Item<'_, '_>, <P13 as SystemParam>::Item<'_, '_>, <P14 as SystemParam>::Item<'_, '_>, <P15 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15), In = Input, Out = InnerOut>,
pub fn build_system_with_input<Input, InnerOut, Out, Marker, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
Input: SystemInput,
InnerOut: IntoResult<Out>,
Out: 'static,
F: FnMut(Input, <P0 as SystemParam>::Item<'_, '_>, <P1 as SystemParam>::Item<'_, '_>, <P2 as SystemParam>::Item<'_, '_>, <P3 as SystemParam>::Item<'_, '_>, <P4 as SystemParam>::Item<'_, '_>, <P5 as SystemParam>::Item<'_, '_>, <P6 as SystemParam>::Item<'_, '_>, <P7 as SystemParam>::Item<'_, '_>, <P8 as SystemParam>::Item<'_, '_>, <P9 as SystemParam>::Item<'_, '_>, <P10 as SystemParam>::Item<'_, '_>, <P11 as SystemParam>::Item<'_, '_>, <P12 as SystemParam>::Item<'_, '_>, <P13 as SystemParam>::Item<'_, '_>, <P14 as SystemParam>::Item<'_, '_>, <P15 as SystemParam>::Item<'_, '_>) -> InnerOut + SystemParamFunction<Marker, Param = (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15), In = Input, Out = InnerOut>,
Create a FunctionSystem
from a SystemState
.
This method signature allows type inference of closure parameters for a system with input.
You can use SystemState::build_system()
if you have no input, or SystemState::build_any_system()
if you don’t need type inference.
Source§impl<Param> SystemState<Param>where
Param: SystemParam,
impl<Param> SystemState<Param>where
Param: SystemParam,
Sourcepub fn new(world: &mut World) -> SystemState<Param>
pub fn new(world: &mut World) -> SystemState<Param>
Creates a new SystemState
with default state.
Sourcepub fn build_any_system<Marker, Out, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
F: SystemParamFunction<Marker, Param = Param>,
<F as SystemParamFunction<Marker>>::Out: IntoResult<Out>,
pub fn build_any_system<Marker, Out, F>(
self,
func: F,
) -> FunctionSystem<Marker, Out, F>where
F: SystemParamFunction<Marker, Param = Param>,
<F as SystemParamFunction<Marker>>::Out: IntoResult<Out>,
Create a FunctionSystem
from a SystemState
.
This method signature allows any system function, but the compiler will not perform type inference on closure parameters.
You can use SystemState::build_system()
or SystemState::build_system_with_input()
to get type inference on parameters.
Sourcepub fn meta(&self) -> &SystemMeta
pub fn meta(&self) -> &SystemMeta
Gets the metadata for this instance.
Sourcepub fn meta_mut(&mut self) -> &mut SystemMeta
pub fn meta_mut(&mut self) -> &mut SystemMeta
Gets the metadata for this instance.
Sourcepub fn get<'w, 's>(
&'s mut self,
world: &'w World,
) -> <Param as SystemParam>::Item<'w, 's>where
Param: ReadOnlySystemParam,
pub fn get<'w, 's>(
&'s mut self,
world: &'w World,
) -> <Param as SystemParam>::Item<'w, 's>where
Param: ReadOnlySystemParam,
Retrieve the SystemParam
values. This can only be called when all parameters are read-only.
Sourcepub fn get_mut<'w, 's>(
&'s mut self,
world: &'w mut World,
) -> <Param as SystemParam>::Item<'w, 's>
pub fn get_mut<'w, 's>( &'s mut self, world: &'w mut World, ) -> <Param as SystemParam>::Item<'w, 's>
Retrieve the mutable SystemParam
values.
Sourcepub fn apply(&mut self, world: &mut World)
pub fn apply(&mut self, world: &mut World)
Applies all state queued up for SystemParam
values. For example, this will apply commands queued up
by a Commands
parameter to the given World
.
This function should be called manually after the values returned by SystemState::get
and SystemState::get_mut
are finished being used.
Sourcepub unsafe fn validate_param(
state: &mut SystemState<Param>,
world: UnsafeWorldCell<'_>,
) -> Result<(), SystemParamValidationError>
pub unsafe fn validate_param( state: &mut SystemState<Param>, world: UnsafeWorldCell<'_>, ) -> Result<(), SystemParamValidationError>
Wrapper over SystemParam::validate_param
.
§Safety
- The passed
UnsafeWorldCell
must have read-only access to world data incomponent_access_set
. world
must be the sameWorld
that was used to initializestate
.
Sourcepub fn matches_world(&self, world_id: WorldId) -> bool
pub fn matches_world(&self, world_id: WorldId) -> bool
Returns true
if world_id
matches the World
that was used to call SystemState::new
.
Otherwise, this returns false.
Sourcepub fn update_archetypes(&mut self, _world: &World)
👎Deprecated since 0.17.0: No longer has any effect. Calls may be removed.
pub fn update_archetypes(&mut self, _world: &World)
Has no effect
Sourcepub fn update_archetypes_unsafe_world_cell(
&mut self,
_world: UnsafeWorldCell<'_>,
)
👎Deprecated since 0.17.0: No longer has any effect. Calls may be removed.
pub fn update_archetypes_unsafe_world_cell( &mut self, _world: UnsafeWorldCell<'_>, )
Has no effect
Sourcepub fn get_manual<'w, 's>(
&'s mut self,
world: &'w World,
) -> <Param as SystemParam>::Item<'w, 's>where
Param: ReadOnlySystemParam,
👎Deprecated since 0.17.0: Call SystemState::get
instead.
pub fn get_manual<'w, 's>(
&'s mut self,
world: &'w World,
) -> <Param as SystemParam>::Item<'w, 's>where
Param: ReadOnlySystemParam,
SystemState::get
instead.Identical to SystemState::get
.
Sourcepub fn get_manual_mut<'w, 's>(
&'s mut self,
world: &'w mut World,
) -> <Param as SystemParam>::Item<'w, 's>
👎Deprecated since 0.17.0: Call SystemState::get_mut
instead.
pub fn get_manual_mut<'w, 's>( &'s mut self, world: &'w mut World, ) -> <Param as SystemParam>::Item<'w, 's>
SystemState::get_mut
instead.Identical to SystemState::get_mut
.
Sourcepub unsafe fn get_unchecked_manual<'w, 's>(
&'s mut self,
world: UnsafeWorldCell<'w>,
) -> <Param as SystemParam>::Item<'w, 's>
👎Deprecated since 0.17.0: Call SystemState::get_unchecked
instead.
pub unsafe fn get_unchecked_manual<'w, 's>( &'s mut self, world: UnsafeWorldCell<'w>, ) -> <Param as SystemParam>::Item<'w, 's>
SystemState::get_unchecked
instead.Identical to SystemState::get_unchecked
.
§Safety
This call might access any of the input parameters in a way that violates Rust’s mutability rules. Make sure the data
access is safe in the context of global World
access. The passed-in World
must be the World
the SystemState
was
created with.
Sourcepub unsafe fn get_unchecked<'w, 's>(
&'s mut self,
world: UnsafeWorldCell<'w>,
) -> <Param as SystemParam>::Item<'w, 's>
pub unsafe fn get_unchecked<'w, 's>( &'s mut self, world: UnsafeWorldCell<'w>, ) -> <Param as SystemParam>::Item<'w, 's>
Retrieve the SystemParam
values.
§Safety
This call might access any of the input parameters in a way that violates Rust’s mutability rules. Make sure the data
access is safe in the context of global World
access. The passed-in World
must be the World
the SystemState
was
created with.
Sourcepub fn param_state(&self) -> &<Param as SystemParam>::State
pub fn param_state(&self) -> &<Param as SystemParam>::State
Returns a reference to the current system param states.
Sourcepub unsafe fn param_state_mut(&mut self) -> &mut <Param as SystemParam>::State
pub unsafe fn param_state_mut(&mut self) -> &mut <Param as SystemParam>::State
Returns a mutable reference to the current system param states.
Marked as unsafe because modifying the system states may result in violation to certain
assumptions made by the SystemParam
. Use with care.
§Safety
Modifying the system param states may have unintended consequences.
The param state is generally considered to be owned by the SystemParam
. Modifications
should respect any invariants as required by the SystemParam
.
For example, modifying the system state of ResMut
will obviously create issues.
Trait Implementations§
Source§impl<'a, P> ExclusiveSystemParam for &'a mut SystemState<P>where
P: SystemParam + 'static,
impl<'a, P> ExclusiveSystemParam for &'a mut SystemState<P>where
P: SystemParam + 'static,
Source§type State = SystemState<P>
type State = SystemState<P>
Source§type Item<'s> = &'s mut SystemState<P>
type Item<'s> = &'s mut SystemState<P>
SystemParam::Item
.Source§fn init(
world: &mut World,
_system_meta: &mut SystemMeta,
) -> <&'a mut SystemState<P> as ExclusiveSystemParam>::State
fn init( world: &mut World, _system_meta: &mut SystemMeta, ) -> <&'a mut SystemState<P> as ExclusiveSystemParam>::State
State
.Source§fn get_param<'s>(
state: &'s mut <&'a mut SystemState<P> as ExclusiveSystemParam>::State,
_system_meta: &SystemMeta,
) -> <&'a mut SystemState<P> as ExclusiveSystemParam>::Item<'s>
fn get_param<'s>( state: &'s mut <&'a mut SystemState<P> as ExclusiveSystemParam>::State, _system_meta: &SystemMeta, ) -> <&'a mut SystemState<P> as ExclusiveSystemParam>::Item<'s>
ExclusiveSystemParamFunction
.Source§impl<Param> FromWorld for SystemState<Param>where
Param: SystemParam,
impl<Param> FromWorld for SystemState<Param>where
Param: SystemParam,
Source§fn from_world(world: &mut World) -> SystemState<Param>
fn from_world(world: &mut World) -> SystemState<Param>
Self
using data from the given World
.Auto Trait Implementations§
impl<Param> Freeze for SystemState<Param>
impl<Param> !RefUnwindSafe for SystemState<Param>
impl<Param> Send for SystemState<Param>
impl<Param> Sync for SystemState<Param>
impl<Param> Unpin for SystemState<Param>
impl<Param> !UnwindSafe for SystemState<Param>
Blanket Implementations§
Source§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
Source§fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
T
ShaderType
for self
. When used in AsBindGroup
derives, it is safe to assume that all images in self
exist.Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
, which can then be
downcast
into Box<dyn ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
, which can then be further
downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more