bevy/crates/bevy_ecs/src
Jakob Hellermann 008c156991 refactor: move internals from entity_ref to World, add SAFETY comments (#6402)
# Objective

There are some utility functions for actually working with `Storages` inside `entity_ref.rs` that are used both for `EntityRef/EntityMut` and `World`, with a `// TODO: move to Storages`.
This PR moves them to private methods on `World`, because that's the safest API boundary. On `Storages` you would need to ensure that you pass `Components` from the same world.

## Solution

- move get_component[_with_type], get_ticks[_with_type], get_component_and_ticks[_with_type] to `World` (still pub(crate))
- replace `pub use entity_ref::*;` with `pub use entity_ref::{EntityRef, EntityMut}` and qualified `entity_ref::get_mut[_by_id]` in `world.rs`
- add safety comments to a bunch of methods
2023-01-13 16:50:26 +00:00
..
entity Fix various typos (#7096) 2023-01-06 00:43:30 +00:00
query Added Ref to allow immutable access with change detection (#7097) 2023-01-11 15:41:54 +00:00
schedule Fix beta clippy lints (#7154) 2023-01-11 09:51:22 +00:00
storage Remove duplicate lookups from Resource initialization (#7174) 2023-01-12 23:25:11 +00:00
system Added Ref to allow immutable access with change detection (#7097) 2023-01-11 15:41:54 +00:00
world refactor: move internals from entity_ref to World, add SAFETY comments (#6402) 2023-01-13 16:50:26 +00:00
archetype.rs Mark TableRow and TableId as repr(transparent) (#7166) 2023-01-11 23:31:22 +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 Document options for !Sync types for Component and Resources (#6864) 2022-12-11 18:34:13 +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 Added Ref to allow immutable access with change detection (#7097) 2023-01-11 15:41:54 +00:00
reflect.rs Enable Constructing ReflectComponent/Resource (#6257) 2022-10-17 14:01:50 +00:00