bevy/crates/bevy_ecs/src
JoJoJet 9ffba9bb1a Allow returning a value from EntityMut::world_scope (#7385)
# Objective

The function `EntityMut::world_scope` is a safe abstraction that allows you to temporarily get mutable access to the underlying `World` of an `EntityMut`. This function is purely stateful, meaning it is not easily possible to return a value from it.

## Solution

Allow returning a computed value from the closure. This is similar to how `World::resource_scope` works.

---

## Changelog

- The function `EntityMut::world_scope` now allows returning a value from the immediately-computed closure.
2023-01-27 19:42:10 +00:00
..
entity Make EntityRef::new unsafe (#7222) 2023-01-16 22:10:51 +00:00
query Basic adaptive batching for parallel query iteration (#4777) 2023-01-20 08:47:20 +00:00
schedule Fix minor typos in code and docs (#7378) 2023-01-27 12:12:53 +00:00
schedule_v3 Fix minor typos in code and docs (#7378) 2023-01-27 12:12:53 +00:00
storage Add World::clear_resources & World::clear_all (#3212) 2023-01-17 04:20:42 +00:00
system Fix minor typos in code and docs (#7378) 2023-01-27 12:12:53 +00:00
world Allow returning a value from EntityMut::world_scope (#7385) 2023-01-27 19:42:10 +00:00
archetype.rs Fix minor typos in code and docs (#7378) 2023-01-27 12:12:53 +00:00
bundle.rs Fix beta clippy lints (#7154) 2023-01-11 09:51:22 +00:00
change_detection.rs Add a method for converting MutUntyped -> Mut<T> (#7113) 2023-01-11 17:47:54 +00:00
component.rs Added resource_id and changed init_resource and init_non_send_resource to return ComponentId (#7284) 2023-01-20 19:08:04 +00:00
event.rs Rework manual event iterator so we can actually name the type (#5735) 2022-12-25 00:39:27 +00:00
lib.rs Fix minor typos in code and docs (#7378) 2023-01-27 12:12:53 +00:00
reflect.rs add UnsafeWorldCell abstraction (#6404) 2023-01-27 00:12:13 +00:00