Skip to content

Commit b1b70e2

Browse files
committed
Add DynamicTyped link to TypeInfo docs (#15188)
1 parent b45d83e commit b1b70e2

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

crates/bevy_reflect/src/type_info.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,15 +172,17 @@ pub enum TypeInfoError {
172172

173173
/// Compile-time type information for various reflected types.
174174
///
175-
/// Generally, for any given type, this value can be retrieved one of three ways:
175+
/// Generally, for any given type, this value can be retrieved in one of four ways:
176176
///
177177
/// 1. [`Typed::type_info`]
178-
/// 2. [`PartialReflect::get_represented_type_info`]
179-
/// 3. [`TypeRegistry::get_type_info`]
178+
/// 2. [`DynamicTyped::reflect_type_info`]
179+
/// 3. [`PartialReflect::get_represented_type_info`]
180+
/// 4. [`TypeRegistry::get_type_info`]
180181
///
181182
/// Each return a static reference to [`TypeInfo`], but they all have their own use cases.
182183
/// For example, if you know the type at compile time, [`Typed::type_info`] is probably
183-
/// the simplest. If all you have is a `dyn PartialReflect`, you'll probably want [`PartialReflect::get_represented_type_info`].
184+
/// the simplest. If you have a `dyn Reflect` you can use [`DynamicTyped::reflect_type_info`].
185+
/// If all you have is a `dyn PartialReflect`, you'll probably want [`PartialReflect::get_represented_type_info`].
184186
/// Lastly, if all you have is a [`TypeId`] or [type path], you will need to go through
185187
/// [`TypeRegistry::get_type_info`].
186188
///

0 commit comments

Comments
 (0)