logo
pub trait IntoSystem<In, Out, Params> {
    type System: System
    where
        <Self::System as System>::In == In,
        <Self::System as System>::Out == Out
; 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::system::IntoSystem;
use bevy_ecs::system::Res;

fn my_system_function(an_usize_resource: Res<usize>) {}

let system = IntoSystem::into_system(my_system_function);

Required Associated Types

Required Methods

Turns this value into its corresponding System.

Implementors