bevy/crates/bevy_asset/src
CatThingy 89cbc78d3d
Require #[derive(Event)] on all Events (#7086)
# Objective

Be consistent with `Resource`s and `Components` and have `Event` types
be more self-documenting.
Although not susceptible to accidentally using a function instead of a
value due to `Event`s only being initialized by their type, much of the
same reasoning for removing the blanket impl on `Resource` also applies
here.

* Not immediately obvious if a type is intended to be an event
* Prevent invisible conflicts if the same third-party or primitive types
are used as events
* Allows for further extensions (e.g. opt-in warning for missed events)

## Solution

Remove the blanket impl for the `Event` trait. Add a derive macro for
it.

---

## Changelog

- `Event` is no longer implemented for all applicable types. Add the
`#[derive(Event)]` macro for events.

## Migration Guide

* Add the `#[derive(Event)]` macro for events. Third-party types used as
events should be wrapped in a newtype.
2023-06-06 14:44:32 +00:00
..
diagnostic Allow systems using Diagnostics to run in parallel (#8677) 2023-06-05 20:51:22 +00:00
io Delay asset hot reloading (#8503) 2023-05-16 01:26:11 +00:00
asset_server.rs reflect: stable type path v2 (#7184) 2023-06-05 20:31:20 +00:00
assets.rs Require #[derive(Event)] on all Events (#7086) 2023-06-06 14:44:32 +00:00
debug_asset_server.rs Delay asset hot reloading (#8503) 2023-05-16 01:26:11 +00:00
filesystem_watcher.rs Delay asset hot reloading (#8503) 2023-05-16 01:26:11 +00:00
handle.rs Use cmp of Self in implementaions of partial_cmp (#8559) 2023-05-06 22:31:25 +00:00
info.rs docs: Full documentation for bevy_asset (#3536) 2022-07-12 15:44:09 +00:00
lib.rs Delay asset hot reloading (#8503) 2023-05-16 01:26:11 +00:00
loader.rs reflect: stable type path v2 (#7184) 2023-06-05 20:31:20 +00:00
path.rs update ahash and hashbrown (#8623) 2023-05-23 02:17:07 +00:00
reflect.rs Fixed several missing links in docs. (#8117) 2023-04-23 17:28:36 +00:00