logo

Trait bevy::ecs::system::IntoSystem[]

pub trait IntoSystem<In, Out, Params> {
    type System: System;
    fn system(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 = my_system_function.system();

Associated Types

Required methods

Turns this value into its corresponding System.

Implementors