bevy/crates/bevy_window
Vic 5b899dcc3a
impl EntityBorrow for more types (#16917)
# Objective

Some types like `RenderEntity` and `MainEntity` are just wrappers around
`Entity`, so they should be able to implement
`EntityBorrow`/`TrustedEntityBorrow`. This allows using them with
`EntitySet` functionality.
The `EntityRef` family are more than direct wrappers around `Entity`,
but can still benefit from being unique in a collection.

## Solution

Implement `EntityBorrow` and `TrustedEntityBorrow` for simple `Entity`
newtypes and `EntityRef` types.
These impls are an explicit decision to have the `EntityRef` types
compare like just `Entity`.
`EntityWorldMut` is omitted from this impl, because it explicitly
contains a `&mut World` as well, and we do not ever use more than one at
a time.

Add `EntityBorrow` to the `bevy_ecs` prelude.

## Migration Guide

`NormalizedWindowRef::entity` has been replaced with an
`EntityBorrow::entity` impl.
2024-12-24 02:47:03 +00:00
..
src impl EntityBorrow for more types (#16917) 2024-12-24 02:47:03 +00:00
Cargo.toml Replace bevy_a11y::Focus with InputFocus (#16863) 2024-12-18 00:16:19 +00:00
README.md Fix bevy_window and bevy_winit readme badges (#15637) 2024-10-04 00:38:49 +00:00

Bevy Window

License Crates.io Downloads Docs Discord