Skip to main content

IntoSystem

Trait IntoSystem 

Source
pub trait IntoSystem<Marker> {
    type System: System;

    // Required method
    fn into_system(self) -> Self::System;
}
Expand description

Converts a function (or closure) with valid system parameters into a System that can be registered with App::add_system.

Implemented via the [impl_system!] macro for function arities 0–8.

Required Associated Types§

Required Methods§

Source

fn into_system(self) -> Self::System

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T, A, B, C, D, E, F, G, H, I, J, K, L> IntoSystem<(A, B, C, D, E, F, G, H, I, J, K, L)> for T
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, for<'a> &'a mut T: FnMut(A, B, C, D, E, F, G, H, I, J, K, L), 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,

Source§

impl<T, A, B, C, D, E, F, G, H, I, J, K> IntoSystem<(A, B, C, D, E, F, G, H, I, J, K)> for T
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, for<'a> &'a mut T: FnMut(A, B, C, D, E, F, G, H, I, J, K), 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,

Source§

impl<T, A, B, C, D, E, F, G, H, I, J> IntoSystem<(A, B, C, D, E, F, G, H, I, J)> for T
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, for<'a> &'a mut T: FnMut(A, B, C, D, E, F, G, H, I, J), 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,

Source§

impl<T, A, B, C, D, E, F, G, H, I> IntoSystem<(A, B, C, D, E, F, G, H, I)> for T
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, for<'a> &'a mut T: FnMut(A, B, C, D, E, F, G, H, I), 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,

Source§

impl<T, A, B, C, D, E, F, G, H> IntoSystem<(A, B, C, D, E, F, G, H)> for T
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, for<'a> &'a mut T: FnMut(A, B, C, D, E, F, G, H), A: SystemParam + 'static, B: SystemParam + 'static, C: SystemParam + 'static, D: SystemParam + 'static, E: SystemParam + 'static, F: SystemParam + 'static, G: SystemParam + 'static, H: SystemParam + 'static,

Source§

impl<T, A, B, C, D, E, F, G> IntoSystem<(A, B, C, D, E, F, G)> for T
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, for<'a> &'a mut T: FnMut(A, B, C, D, E, F, G), A: SystemParam + 'static, B: SystemParam + 'static, C: SystemParam + 'static, D: SystemParam + 'static, E: SystemParam + 'static, F: SystemParam + 'static, G: SystemParam + 'static,

Source§

impl<T, A, B, C, D, E, F> IntoSystem<(A, B, C, D, E, F)> for T
where T: for<'a> FnMut(A::Item<'a>, B::Item<'a>, C::Item<'a>, D::Item<'a>, E::Item<'a>, F::Item<'a>) + 'static, for<'a> &'a mut T: FnMut(A, B, C, D, E, F), A: SystemParam + 'static, B: SystemParam + 'static, C: SystemParam + 'static, D: SystemParam + 'static, E: SystemParam + 'static, F: SystemParam + 'static,

Source§

impl<T, A, B, C, D, E> IntoSystem<(A, B, C, D, E)> for T
where T: for<'a> FnMut(A::Item<'a>, B::Item<'a>, C::Item<'a>, D::Item<'a>, E::Item<'a>) + 'static, for<'a> &'a mut T: FnMut(A, B, C, D, E), A: SystemParam + 'static, B: SystemParam + 'static, C: SystemParam + 'static, D: SystemParam + 'static, E: SystemParam + 'static,

Source§

impl<T, A, B, C, D> IntoSystem<(A, B, C, D)> for T
where T: for<'a> FnMut(A::Item<'a>, B::Item<'a>, C::Item<'a>, D::Item<'a>) + 'static, for<'a> &'a mut T: FnMut(A, B, C, D), A: SystemParam + 'static, B: SystemParam + 'static, C: SystemParam + 'static, D: SystemParam + 'static,

Source§

impl<T, A, B, C> IntoSystem<(A, B, C)> for T
where T: for<'a> FnMut(A::Item<'a>, B::Item<'a>, C::Item<'a>) + 'static, for<'a> &'a mut T: FnMut(A, B, C), A: SystemParam + 'static, B: SystemParam + 'static, C: SystemParam + 'static,

Source§

impl<T, A, B> IntoSystem<(A, B)> for T
where T: for<'a> FnMut(A::Item<'a>, B::Item<'a>) + 'static, for<'a> &'a mut T: FnMut(A, B), A: SystemParam + 'static, B: SystemParam + 'static,

Source§

impl<T, A> IntoSystem<(A,)> for T
where T: for<'a> FnMut(A::Item<'a>) + 'static, for<'a> &'a mut T: FnMut(A), A: SystemParam + 'static,

Source§

impl<T, Marker, C> IntoSystem<Marker> for RunIfSystem<T, Marker, C>
where T: IntoSystem<Marker>, C: RunCondition,

Source§

type System = Conditional<<T as IntoSystem<Marker>>::System, C>

Source§

impl<T> IntoSystem<()> for T
where T: for<'a> FnMut() + 'static, for<'a> &'a mut T: FnMut(),