Function bevy::ecs::system::assert_is_read_only_system

pub fn assert_is_read_only_system<In, Out, Marker, S>(system: S)
where In: 'static, Out: 'static, S: IntoSystem<In, Out, Marker>, <S as IntoSystem<In, Out, Marker>>::System: ReadOnlySystem,
Expand description

Ensure that a given function is a read-only system.

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


The following example will fail to compile since the system accesses a component mutably.

fn my_system(query: Query<&mut Transform>) {
    // ...