bevy_ecs::system

Function assert_is_system

Source
pub fn assert_is_system<In: 'static, Out: 'static, Marker>(
    system: impl IntoSystem<In, Out, Marker>,
)
Expand description

Ensure that a given function is a system.

This should be used when writing doc examples, to confirm that systems used in an example are valid systems.

§Examples

The following example will panic when run since the system’s parameters mutably access the same component multiple times.

fn my_system(query1: Query<&mut Transform>, query2: Query<&mut Transform>) {
    // ...
}

assert_is_system(my_system);