pub struct FunctionSystem<F, Marker, State = ()> {
pub func: F,
/* private fields */
}Expand description
Type-erased wrapper around a system function, created by IntoSystem.
Holds State, the tuple of each parameter’s SystemParam::State — this
is where Local values actually live between calls to run.
Fields§
§func: FTrait Implementations§
Source§impl<T> System for FunctionSystem<T, (), ()>where
T: for<'a> FnMut() + 'static,
impl<T> System for FunctionSystem<T, (), ()>where
T: for<'a> FnMut() + 'static,
fn run(&mut self, _world: &World, _resources: &Resources)
Source§fn requires(&self) -> Vec<RequiredResource>
fn requires(&self) -> Vec<RequiredResource>
Resource types this system needs present, derived automatically from
its bare
Res/ResMut parameters. App
checks these before running a non-convergent stage’s systems and
panics with a clear message naming the missing resource(s) rather
than letting a param fetch panic deep inside whichever system happens
to run first.Source§impl<T, A> System for FunctionSystem<T, (A,), (A::State,)>
impl<T, A> System for FunctionSystem<T, (A,), (A::State,)>
fn run(&mut self, _world: &World, _resources: &Resources)
Source§fn requires(&self) -> Vec<RequiredResource>
fn requires(&self) -> Vec<RequiredResource>
Resource types this system needs present, derived automatically from
its bare
Res/ResMut parameters. App
checks these before running a non-convergent stage’s systems and
panics with a clear message naming the missing resource(s) rather
than letting a param fetch panic deep inside whichever system happens
to run first.Source§impl<T, A, B> System for FunctionSystem<T, (A, B), (A::State, B::State)>where
T: for<'a> FnMut(A::Item<'a>, B::Item<'a>) + 'static,
A: SystemParam + 'static,
B: SystemParam + 'static,
impl<T, A, B> System for FunctionSystem<T, (A, B), (A::State, B::State)>where
T: for<'a> FnMut(A::Item<'a>, B::Item<'a>) + 'static,
A: SystemParam + 'static,
B: SystemParam + 'static,
fn run(&mut self, _world: &World, _resources: &Resources)
Source§fn requires(&self) -> Vec<RequiredResource>
fn requires(&self) -> Vec<RequiredResource>
Resource types this system needs present, derived automatically from
its bare
Res/ResMut parameters. App
checks these before running a non-convergent stage’s systems and
panics with a clear message naming the missing resource(s) rather
than letting a param fetch panic deep inside whichever system happens
to run first.Source§impl<T, A, B, C> System for FunctionSystem<T, (A, B, C), (A::State, B::State, C::State)>where
T: for<'a> FnMut(A::Item<'a>, B::Item<'a>, C::Item<'a>) + 'static,
A: SystemParam + 'static,
B: SystemParam + 'static,
C: SystemParam + 'static,
impl<T, A, B, C> System for FunctionSystem<T, (A, B, C), (A::State, B::State, C::State)>where
T: for<'a> FnMut(A::Item<'a>, B::Item<'a>, C::Item<'a>) + 'static,
A: SystemParam + 'static,
B: SystemParam + 'static,
C: SystemParam + 'static,
fn run(&mut self, _world: &World, _resources: &Resources)
Source§fn requires(&self) -> Vec<RequiredResource>
fn requires(&self) -> Vec<RequiredResource>
Resource types this system needs present, derived automatically from
its bare
Res/ResMut parameters. App
checks these before running a non-convergent stage’s systems and
panics with a clear message naming the missing resource(s) rather
than letting a param fetch panic deep inside whichever system happens
to run first.Source§impl<T, A, B, C, D> System for FunctionSystem<T, (A, B, C, D), (A::State, B::State, C::State, D::State)>where
T: for<'a> FnMut(A::Item<'a>, B::Item<'a>, C::Item<'a>, D::Item<'a>) + 'static,
A: SystemParam + 'static,
B: SystemParam + 'static,
C: SystemParam + 'static,
D: SystemParam + 'static,
impl<T, A, B, C, D> System for FunctionSystem<T, (A, B, C, D), (A::State, B::State, C::State, D::State)>where
T: for<'a> FnMut(A::Item<'a>, B::Item<'a>, C::Item<'a>, D::Item<'a>) + 'static,
A: SystemParam + 'static,
B: SystemParam + 'static,
C: SystemParam + 'static,
D: SystemParam + 'static,
fn run(&mut self, _world: &World, _resources: &Resources)
Source§fn requires(&self) -> Vec<RequiredResource>
fn requires(&self) -> Vec<RequiredResource>
Resource types this system needs present, derived automatically from
its bare
Res/ResMut parameters. App
checks these before running a non-convergent stage’s systems and
panics with a clear message naming the missing resource(s) rather
than letting a param fetch panic deep inside whichever system happens
to run first.Source§impl<T, A, B, C, D, E> System for FunctionSystem<T, (A, B, C, D, E), (A::State, B::State, C::State, D::State, E::State)>where
T: for<'a> FnMut(A::Item<'a>, B::Item<'a>, C::Item<'a>, D::Item<'a>, E::Item<'a>) + 'static,
A: SystemParam + 'static,
B: SystemParam + 'static,
C: SystemParam + 'static,
D: SystemParam + 'static,
E: SystemParam + 'static,
impl<T, A, B, C, D, E> System for FunctionSystem<T, (A, B, C, D, E), (A::State, B::State, C::State, D::State, E::State)>where
T: for<'a> FnMut(A::Item<'a>, B::Item<'a>, C::Item<'a>, D::Item<'a>, E::Item<'a>) + 'static,
A: SystemParam + 'static,
B: SystemParam + 'static,
C: SystemParam + 'static,
D: SystemParam + 'static,
E: SystemParam + 'static,
fn run(&mut self, _world: &World, _resources: &Resources)
Source§fn requires(&self) -> Vec<RequiredResource>
fn requires(&self) -> Vec<RequiredResource>
Resource types this system needs present, derived automatically from
its bare
Res/ResMut parameters. App
checks these before running a non-convergent stage’s systems and
panics with a clear message naming the missing resource(s) rather
than letting a param fetch panic deep inside whichever system happens
to run first.Source§impl<T, A, B, C, D, E, F> System for FunctionSystem<T, (A, B, C, D, E, F), (A::State, B::State, C::State, D::State, E::State, F::State)>where
T: for<'a> FnMut(A::Item<'a>, B::Item<'a>, C::Item<'a>, D::Item<'a>, E::Item<'a>, F::Item<'a>) + 'static,
A: SystemParam + 'static,
B: SystemParam + 'static,
C: SystemParam + 'static,
D: SystemParam + 'static,
E: SystemParam + 'static,
F: SystemParam + 'static,
impl<T, A, B, C, D, E, F> System for FunctionSystem<T, (A, B, C, D, E, F), (A::State, B::State, C::State, D::State, E::State, F::State)>where
T: for<'a> FnMut(A::Item<'a>, B::Item<'a>, C::Item<'a>, D::Item<'a>, E::Item<'a>, F::Item<'a>) + 'static,
A: SystemParam + 'static,
B: SystemParam + 'static,
C: SystemParam + 'static,
D: SystemParam + 'static,
E: SystemParam + 'static,
F: SystemParam + 'static,
fn run(&mut self, _world: &World, _resources: &Resources)
Source§fn requires(&self) -> Vec<RequiredResource>
fn requires(&self) -> Vec<RequiredResource>
Resource types this system needs present, derived automatically from
its bare
Res/ResMut parameters. App
checks these before running a non-convergent stage’s systems and
panics with a clear message naming the missing resource(s) rather
than letting a param fetch panic deep inside whichever system happens
to run first.Source§impl<T, A, B, C, D, E, F, G> System for FunctionSystem<T, (A, B, C, D, E, F, G), (A::State, B::State, C::State, D::State, E::State, F::State, G::State)>where
T: for<'a> FnMut(A::Item<'a>, B::Item<'a>, C::Item<'a>, D::Item<'a>, E::Item<'a>, F::Item<'a>, G::Item<'a>) + 'static,
A: SystemParam + 'static,
B: SystemParam + 'static,
C: SystemParam + 'static,
D: SystemParam + 'static,
E: SystemParam + 'static,
F: SystemParam + 'static,
G: SystemParam + 'static,
impl<T, A, B, C, D, E, F, G> System for FunctionSystem<T, (A, B, C, D, E, F, G), (A::State, B::State, C::State, D::State, E::State, F::State, G::State)>where
T: for<'a> FnMut(A::Item<'a>, B::Item<'a>, C::Item<'a>, D::Item<'a>, E::Item<'a>, F::Item<'a>, G::Item<'a>) + 'static,
A: SystemParam + 'static,
B: SystemParam + 'static,
C: SystemParam + 'static,
D: SystemParam + 'static,
E: SystemParam + 'static,
F: SystemParam + 'static,
G: SystemParam + 'static,
fn run(&mut self, _world: &World, _resources: &Resources)
Source§fn requires(&self) -> Vec<RequiredResource>
fn requires(&self) -> Vec<RequiredResource>
Resource types this system needs present, derived automatically from
its bare
Res/ResMut parameters. App
checks these before running a non-convergent stage’s systems and
panics with a clear message naming the missing resource(s) rather
than letting a param fetch panic deep inside whichever system happens
to run first.Source§impl<T, A, B, C, D, E, F, G, H> System for FunctionSystem<T, (A, B, C, D, E, F, G, H), (A::State, B::State, C::State, D::State, E::State, F::State, G::State, H::State)>where
T: for<'a> FnMut(A::Item<'a>, B::Item<'a>, C::Item<'a>, D::Item<'a>, E::Item<'a>, F::Item<'a>, G::Item<'a>, H::Item<'a>) + 'static,
A: SystemParam + 'static,
B: SystemParam + 'static,
C: SystemParam + 'static,
D: SystemParam + 'static,
E: SystemParam + 'static,
F: SystemParam + 'static,
G: SystemParam + 'static,
H: SystemParam + 'static,
impl<T, A, B, C, D, E, F, G, H> System for FunctionSystem<T, (A, B, C, D, E, F, G, H), (A::State, B::State, C::State, D::State, E::State, F::State, G::State, H::State)>where
T: for<'a> FnMut(A::Item<'a>, B::Item<'a>, C::Item<'a>, D::Item<'a>, E::Item<'a>, F::Item<'a>, G::Item<'a>, H::Item<'a>) + 'static,
A: SystemParam + 'static,
B: SystemParam + 'static,
C: SystemParam + 'static,
D: SystemParam + 'static,
E: SystemParam + 'static,
F: SystemParam + 'static,
G: SystemParam + 'static,
H: SystemParam + 'static,
fn run(&mut self, _world: &World, _resources: &Resources)
Source§fn requires(&self) -> Vec<RequiredResource>
fn requires(&self) -> Vec<RequiredResource>
Resource types this system needs present, derived automatically from
its bare
Res/ResMut parameters. App
checks these before running a non-convergent stage’s systems and
panics with a clear message naming the missing resource(s) rather
than letting a param fetch panic deep inside whichever system happens
to run first.Source§impl<T, A, B, C, D, E, F, G, H, I> System for FunctionSystem<T, (A, B, C, D, E, F, G, H, I), (A::State, B::State, C::State, D::State, E::State, F::State, G::State, H::State, I::State)>where
T: for<'a> FnMut(A::Item<'a>, B::Item<'a>, C::Item<'a>, D::Item<'a>, E::Item<'a>, F::Item<'a>, G::Item<'a>, H::Item<'a>, I::Item<'a>) + 'static,
A: SystemParam + 'static,
B: SystemParam + 'static,
C: SystemParam + 'static,
D: SystemParam + 'static,
E: SystemParam + 'static,
F: SystemParam + 'static,
G: SystemParam + 'static,
H: SystemParam + 'static,
I: SystemParam + 'static,
impl<T, A, B, C, D, E, F, G, H, I> System for FunctionSystem<T, (A, B, C, D, E, F, G, H, I), (A::State, B::State, C::State, D::State, E::State, F::State, G::State, H::State, I::State)>where
T: for<'a> FnMut(A::Item<'a>, B::Item<'a>, C::Item<'a>, D::Item<'a>, E::Item<'a>, F::Item<'a>, G::Item<'a>, H::Item<'a>, I::Item<'a>) + 'static,
A: SystemParam + 'static,
B: SystemParam + 'static,
C: SystemParam + 'static,
D: SystemParam + 'static,
E: SystemParam + 'static,
F: SystemParam + 'static,
G: SystemParam + 'static,
H: SystemParam + 'static,
I: SystemParam + 'static,
fn run(&mut self, _world: &World, _resources: &Resources)
Source§fn requires(&self) -> Vec<RequiredResource>
fn requires(&self) -> Vec<RequiredResource>
Resource types this system needs present, derived automatically from
its bare
Res/ResMut parameters. App
checks these before running a non-convergent stage’s systems and
panics with a clear message naming the missing resource(s) rather
than letting a param fetch panic deep inside whichever system happens
to run first.Source§impl<T, A, B, C, D, E, F, G, H, I, J> System for FunctionSystem<T, (A, B, C, D, E, F, G, H, I, J), (A::State, B::State, C::State, D::State, E::State, F::State, G::State, H::State, I::State, J::State)>where
T: for<'a> FnMut(A::Item<'a>, B::Item<'a>, C::Item<'a>, D::Item<'a>, E::Item<'a>, F::Item<'a>, G::Item<'a>, H::Item<'a>, I::Item<'a>, J::Item<'a>) + 'static,
A: SystemParam + 'static,
B: SystemParam + 'static,
C: SystemParam + 'static,
D: SystemParam + 'static,
E: SystemParam + 'static,
F: SystemParam + 'static,
G: SystemParam + 'static,
H: SystemParam + 'static,
I: SystemParam + 'static,
J: SystemParam + 'static,
impl<T, A, B, C, D, E, F, G, H, I, J> System for FunctionSystem<T, (A, B, C, D, E, F, G, H, I, J), (A::State, B::State, C::State, D::State, E::State, F::State, G::State, H::State, I::State, J::State)>where
T: for<'a> FnMut(A::Item<'a>, B::Item<'a>, C::Item<'a>, D::Item<'a>, E::Item<'a>, F::Item<'a>, G::Item<'a>, H::Item<'a>, I::Item<'a>, J::Item<'a>) + 'static,
A: SystemParam + 'static,
B: SystemParam + 'static,
C: SystemParam + 'static,
D: SystemParam + 'static,
E: SystemParam + 'static,
F: SystemParam + 'static,
G: SystemParam + 'static,
H: SystemParam + 'static,
I: SystemParam + 'static,
J: SystemParam + 'static,
fn run(&mut self, _world: &World, _resources: &Resources)
Source§fn requires(&self) -> Vec<RequiredResource>
fn requires(&self) -> Vec<RequiredResource>
Resource types this system needs present, derived automatically from
its bare
Res/ResMut parameters. App
checks these before running a non-convergent stage’s systems and
panics with a clear message naming the missing resource(s) rather
than letting a param fetch panic deep inside whichever system happens
to run first.Source§impl<T, A, B, C, D, E, F, G, H, I, J, K> System for FunctionSystem<T, (A, B, C, D, E, F, G, H, I, J, K), (A::State, B::State, C::State, D::State, E::State, F::State, G::State, H::State, I::State, J::State, K::State)>where
T: for<'a> FnMut(A::Item<'a>, B::Item<'a>, C::Item<'a>, D::Item<'a>, E::Item<'a>, F::Item<'a>, G::Item<'a>, H::Item<'a>, I::Item<'a>, J::Item<'a>, K::Item<'a>) + 'static,
A: SystemParam + 'static,
B: SystemParam + 'static,
C: SystemParam + 'static,
D: SystemParam + 'static,
E: SystemParam + 'static,
F: SystemParam + 'static,
G: SystemParam + 'static,
H: SystemParam + 'static,
I: SystemParam + 'static,
J: SystemParam + 'static,
K: SystemParam + 'static,
impl<T, A, B, C, D, E, F, G, H, I, J, K> System for FunctionSystem<T, (A, B, C, D, E, F, G, H, I, J, K), (A::State, B::State, C::State, D::State, E::State, F::State, G::State, H::State, I::State, J::State, K::State)>where
T: for<'a> FnMut(A::Item<'a>, B::Item<'a>, C::Item<'a>, D::Item<'a>, E::Item<'a>, F::Item<'a>, G::Item<'a>, H::Item<'a>, I::Item<'a>, J::Item<'a>, K::Item<'a>) + 'static,
A: SystemParam + 'static,
B: SystemParam + 'static,
C: SystemParam + 'static,
D: SystemParam + 'static,
E: SystemParam + 'static,
F: SystemParam + 'static,
G: SystemParam + 'static,
H: SystemParam + 'static,
I: SystemParam + 'static,
J: SystemParam + 'static,
K: SystemParam + 'static,
fn run(&mut self, _world: &World, _resources: &Resources)
Source§fn requires(&self) -> Vec<RequiredResource>
fn requires(&self) -> Vec<RequiredResource>
Resource types this system needs present, derived automatically from
its bare
Res/ResMut parameters. App
checks these before running a non-convergent stage’s systems and
panics with a clear message naming the missing resource(s) rather
than letting a param fetch panic deep inside whichever system happens
to run first.Source§impl<T, A, B, C, D, E, F, G, H, I, J, K, L> System for FunctionSystem<T, (A, B, C, D, E, F, G, H, I, J, K, L), (A::State, B::State, C::State, D::State, E::State, F::State, G::State, H::State, I::State, J::State, K::State, L::State)>where
T: for<'a> FnMut(A::Item<'a>, B::Item<'a>, C::Item<'a>, D::Item<'a>, E::Item<'a>, F::Item<'a>, G::Item<'a>, H::Item<'a>, I::Item<'a>, J::Item<'a>, K::Item<'a>, L::Item<'a>) + 'static,
A: SystemParam + 'static,
B: SystemParam + 'static,
C: SystemParam + 'static,
D: SystemParam + 'static,
E: SystemParam + 'static,
F: SystemParam + 'static,
G: SystemParam + 'static,
H: SystemParam + 'static,
I: SystemParam + 'static,
J: SystemParam + 'static,
K: SystemParam + 'static,
L: SystemParam + 'static,
impl<T, A, B, C, D, E, F, G, H, I, J, K, L> System for FunctionSystem<T, (A, B, C, D, E, F, G, H, I, J, K, L), (A::State, B::State, C::State, D::State, E::State, F::State, G::State, H::State, I::State, J::State, K::State, L::State)>where
T: for<'a> FnMut(A::Item<'a>, B::Item<'a>, C::Item<'a>, D::Item<'a>, E::Item<'a>, F::Item<'a>, G::Item<'a>, H::Item<'a>, I::Item<'a>, J::Item<'a>, K::Item<'a>, L::Item<'a>) + 'static,
A: SystemParam + 'static,
B: SystemParam + 'static,
C: SystemParam + 'static,
D: SystemParam + 'static,
E: SystemParam + 'static,
F: SystemParam + 'static,
G: SystemParam + 'static,
H: SystemParam + 'static,
I: SystemParam + 'static,
J: SystemParam + 'static,
K: SystemParam + 'static,
L: SystemParam + 'static,
fn run(&mut self, _world: &World, _resources: &Resources)
Source§fn requires(&self) -> Vec<RequiredResource>
fn requires(&self) -> Vec<RequiredResource>
Resource types this system needs present, derived automatically from
its bare
Res/ResMut parameters. App
checks these before running a non-convergent stage’s systems and
panics with a clear message naming the missing resource(s) rather
than letting a param fetch panic deep inside whichever system happens
to run first.Auto Trait Implementations§
impl<F, Marker, State> Freeze for FunctionSystem<F, Marker, State>
impl<F, Marker, State> RefUnwindSafe for FunctionSystem<F, Marker, State>
impl<F, Marker, State> Send for FunctionSystem<F, Marker, State>
impl<F, Marker, State> Sync for FunctionSystem<F, Marker, State>
impl<F, Marker, State> Unpin for FunctionSystem<F, Marker, State>
impl<F, Marker, State> UnsafeUnpin for FunctionSystem<F, Marker, State>where
F: UnsafeUnpin,
State: UnsafeUnpin,
impl<F, Marker, State> UnwindSafe for FunctionSystem<F, Marker, State>
Blanket Implementations§
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
Mutably borrows from an owned value. Read more