Docs for bevy_reflect::impl_reflect imply that they can be used by user code to implement Reflect for foreign types
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 171
Description
See https://docs.rs/bevy_reflect/latest/bevy_reflect/macro.impl_reflect.html.
> A replacement for #[derive(Reflect)] to be used with foreign types which the definitions of cannot be altered.
It is common to want to implement Reflect for third-party foreign types, and the feature that would allow for this https://github.com/bevyengine/bevy/pull/6042 is not ready yet. In the meanwhile, users are likely to go looking for ways to do this and find this macro.
However, this macro can only be used internally inside the bevy_reflect crate. We should add a note to the docs to that effect, or hide it from the externally visible docs.
Something like:
> A replacement for #[derive(Reflect)] to be used with foreign types which the definitions of cannot be altered. It can only be used from within bevy_reflect and will not work when used in external crates, such as user code.
Or even:
> NOTE: This macro is for internal use. It can only be used from within bevy_reflect and will not work when used in external crates, such as user code.
Contributor guide
Research direction
Start with the impl_reflect macro documentation linked in the issue and locate its source in the bevy_reflect crate. Update the documentation to make clear that the macro is internal-only and does not work from external crates, then verify the generated documentation reflects that limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100