bevy/crates/bevy_window/src
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
..
event.rs Rust 1.83, allow -> expect (missing_docs) (#16561) 2024-12-16 23:27:57 +00:00
lib.rs Replace bevy_a11y::Focus with InputFocus (#16863) 2024-12-18 00:16:19 +00:00
monitor.rs Simpler lint fixes: makes ci lints work but disables a lint for now (#15376) 2024-09-24 11:42:59 +00:00
raw_handle.rs Add core and alloc over std Lints (#15281) 2024-09-27 00:59:59 +00:00
system_cursor.rs Add custom cursors (#14284) 2024-08-12 15:49:03 +00:00
system.rs Properly handle repeated window close requests (#14573) 2024-08-01 16:15:28 +00:00
window.rs impl EntityBorrow for more types (#16917) 2024-12-24 02:47:03 +00:00