@@ -11,13 +11,12 @@ use std::{any::TypeId, fmt::Debug, sync::Arc};
11
11
/// This struct is used as the central store for type information.
12
12
/// [Registering] a type will generate a new [`TypeRegistration`] entry in this store
13
13
/// using a type's [`GetTypeRegistration`] implementation
14
- /// (which will is automatically implemented when using the [` Reflect` derive macro] ).
14
+ /// (which is automatically implemented when using [`#[derive( Reflect)]`](derive@crate::Reflect) ).
15
15
///
16
16
/// See the [crate-level documentation] for more information.
17
17
///
18
18
/// [reflected]: crate
19
19
/// [Registering]: TypeRegistry::register
20
- /// [`Reflect` derive macro]: bevy_reflect_derive::Reflect
21
20
/// [crate-level documentation]: crate
22
21
pub struct TypeRegistry {
23
22
registrations : HashMap < TypeId , TypeRegistration > ,
@@ -43,12 +42,11 @@ impl Debug for TypeRegistryArc {
43
42
/// A trait which allows a type to generate its [`TypeRegistration`]
44
43
/// for registration into the [`TypeRegistry`].
45
44
///
46
- /// This trait is automatically implemented for items using the [` Reflect` derive macro] .
45
+ /// This trait is automatically implemented for items using [`#[derive( Reflect)]`](derive@crate::Reflect) .
47
46
/// The macro also allows [`TypeData`] to be more easily registered.
48
47
///
49
48
/// See the [crate-level documentation] for more information on type registration.
50
49
///
51
- /// [`Reflect` derive macro]: bevy_reflect_derive::Reflect
52
50
/// [crate-level documentation]: crate
53
51
pub trait GetTypeRegistration {
54
52
fn get_type_registration ( ) -> TypeRegistration ;
@@ -279,7 +277,7 @@ impl TypeRegistryArc {
279
277
/// Runtime storage for type metadata, registered into the [`TypeRegistry`].
280
278
///
281
279
/// An instance of `TypeRegistration` can be created using the [`TypeRegistration::of`] method,
282
- /// but is more often automatically generated using the [` Reflect` derive macro] which itself generates
280
+ /// but is more often automatically generated using [`#[derive( Reflect)]`](derive@crate::Reflect) which itself generates
283
281
/// an implementation of the [`GetTypeRegistration`] trait.
284
282
///
285
283
/// Along with the type's [`TypeInfo`] and [short name],
@@ -300,7 +298,6 @@ impl TypeRegistryArc {
300
298
/// assert!(registration.data::<ReflectDefault>().is_some())
301
299
/// ```
302
300
///
303
- /// [`Reflect` derive macro]: bevy_reflect_derive::Reflect
304
301
/// [short name]: bevy_utils::get_short_name
305
302
/// [crate-level documentation]: crate
306
303
pub struct TypeRegistration {
@@ -403,13 +400,12 @@ impl Clone for TypeRegistration {
403
400
///
404
401
/// Type data can be registered to the [`TypeRegistry`] and stored on a type's [`TypeRegistration`].
405
402
///
406
- /// While type data is often generated using the [`#[reflect_trait]`][0] macro,
403
+ /// While type data is often generated using the [`#[reflect_trait]`](crate::reflect_trait) macro,
407
404
/// almost any type that implements [`Clone`] can be considered "type data".
408
405
/// This is because it has a blanket implementation over all `T` where `T: Clone + Send + Sync + 'static`.
409
406
///
410
407
/// See the [crate-level documentation] for more information on type data and type registration.
411
408
///
412
- /// [0]: crate::reflect_trait
413
409
/// [crate-level documentation]: crate
414
410
pub trait TypeData : Downcast + Send + Sync {
415
411
fn clone_type_data ( & self ) -> Box < dyn TypeData > ;
0 commit comments