bevy/crates/bevy_utils/src
theotherphil 66086a2616
Add TypeIdMapExt trait to make TypeIdMap operations more ergonomic (#19683)
# Objective
 
Fix https://github.com/bevyengine/bevy/issues/19642 by enabling e.g.

```
map.get_type::<MyType>();
```

in place of

```
map.get(&TypeId::of::<MyType>());
```

## Solution

Add an extension trait `TypeIdMapExt` with `insert_type`, `get_type`,
`get_type_mut` and `remove_type` counterparts for `insert`, `get`,
`get_mut` and `remove`.

## Testing

Doc test.
2025-06-17 21:06:27 +00:00
..
default.rs fix reference in example usage comments (#19434) 2025-05-29 19:12:55 +00:00
lib.rs bevyengine.org -> bevy.org (#19503) 2025-06-05 23:09:28 +00:00
map.rs Add TypeIdMapExt trait to make TypeIdMap operations more ergonomic (#19683) 2025-06-17 21:06:27 +00:00
once.rs Rename bevy_platform_support to bevy_platform (#18813) 2025-04-11 23:13:28 +00:00
parallel_queue.rs Remove apostrophes in possessive its (#19244) 2025-05-26 19:53:14 +00:00
wgpu_wrapper.rs refactor(render): move WgpuWrapper into bevy_utils (#19303) 2025-05-27 03:43:49 +00:00