bevy/crates/bevy_reflect/src
Doonv b1a2d342af
Add the ability to manually create ParsedPaths (+ cleanup) (#11029)
# Objective

I'm working on a developer console plugin, and I wanted to get a
field/index of a struct/list/tuple. My command parser already parses
member expressions and all that, so I wanted to construct a `ParsedPath`
manually, but it's all private.

## Solution

Make the internals of `ParsedPath` public and add documentation for
everything, and I changed the boxed slice inside `ParsedPath` to a
vector for more flexibility.

I also did a bunch of code cleanup. Improving documentation, error
messages, code, type names, etc.

---

## Changelog

- Added the ability to manually create `ParsedPath`s from their
elements, without the need of string parsing.
- Improved `ReflectPath` error handling.

## Migration Guide

-  `bevy::reflect::AccessError` has been refactored.

That should be it I think, everything else that was changed was private
before this PR.

---------

Co-authored-by: Nicola Papale <nicopap@users.noreply.github.com>
2024-02-01 19:22:40 +00:00
..
enums Remove unnecessary path prefixes (#10749) 2023-11-28 23:43:40 +00:00
impls reflection: replace impl_reflect_struct with impl_reflect (#11437) 2024-01-30 14:39:01 +00:00
path Add the ability to manually create ParsedPaths (+ cleanup) (#11029) 2024-02-01 19:22:40 +00:00
serde Replace or document ignored doctests (#11040) 2024-01-01 16:50:56 +00:00
array.rs Reorder impl to be the same as the trait (#11076) 2023-12-24 17:43:55 +00:00
fields.rs reflect: TypePath part 2 (#8768) 2023-10-09 19:33:03 +00:00
from_reflect.rs reflect: TypePath part 2 (#8768) 2023-10-09 19:33:03 +00:00
lib.rs reflection: replace impl_reflect_struct with impl_reflect (#11437) 2024-01-30 14:39:01 +00:00
list.rs Remove unnecessary path prefixes (#10749) 2023-11-28 23:43:40 +00:00
map.rs Reorder impl to be the same as the trait (#11076) 2023-12-24 17:43:55 +00:00
reflect.rs delete methods deprecated in 0.12 (#10693) 2023-11-24 16:15:47 +00:00
std_traits.rs fix nightly clippy warnings (#6395) 2022-10-28 21:03:01 +00:00
struct_trait.rs Reorder impl to be the same as the trait (#11076) 2023-12-24 17:43:55 +00:00
tuple_struct.rs Reorder impl to be the same as the trait (#11076) 2023-12-24 17:43:55 +00:00
tuple.rs Reorder impl to be the same as the trait (#11076) 2023-12-24 17:43:55 +00:00
type_info.rs Remove unnecessary path prefixes (#10749) 2023-11-28 23:43:40 +00:00
type_path.rs Replace or document ignored doctests (#11040) 2024-01-01 16:50:56 +00:00
type_registry.rs Enable the unsafe_op_in_unsafe_fn lint (#11591) 2024-01-28 23:18:11 +00:00
utility.rs Removed once_cell (#10079) 2023-10-12 10:20:07 +00:00