Trait bevy::prelude::IntoSystem

pub trait IntoSystem<In, Out, Marker>: Sized {
    type System: System<In = In, Out = Out>;

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

Conversion trait to turn something into a System.

Use this to get a system from a function. Also note that every system implements this trait as well.

Examples

use bevy_ecs::prelude::*;

fn my_system_function(a_usize_local: Local<usize>) {}

let system = IntoSystem::into_system(my_system_function);

Required Associated Types§

type System: System<In = In, Out = Out>

Required Methods§

fn into_system(this: Self) -> Self::System

Turns this value into its corresponding System.

Implementors§

§

impl<In, Out, Sys> IntoSystem<In, Out, ()> for Syswhere Sys: System<In = In, Out = Out>,

§

type System = Sys

§

impl<Marker, F> IntoSystem<<F as ExclusiveSystemParamFunction<Marker>>::In, <F as ExclusiveSystemParamFunction<Marker>>::Out, (IsExclusiveFunctionSystem, Marker)> for Fwhere Marker: 'static, F: ExclusiveSystemParamFunction<Marker>,

§

impl<Marker, F> IntoSystem<<F as SystemParamFunction<Marker>>::In, <F as SystemParamFunction<Marker>>::Out, (IsFunctionSystem, Marker)> for Fwhere Marker: 'static, F: SystemParamFunction<Marker>,

§

type System = FunctionSystem<Marker, F>