pub fn assert_is_read_only_system<In: 'static, Out: 'static, Marker, S>(
    system: S
)
where S: IntoSystem<In, Out, Marker>, S::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.

Examples

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

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

assert_is_read_only_system(my_system);