Fluent builder methods for bevy_reflect ParsedPaths. #13227
Labels
A-Reflection
Runtime information about types
C-Enhancement
A new feature
D-Straightforward
Simple bug fixes and API improvements, docs, test and examples
X-Uncontroversial
This work is generally agreed upon
What problem does this solve or what need does it fill?
I'd like a set of builder methods for ParsedPaths. Rather than (or in addition to) parsing paths from strings, I'd like to be able to construct paths using a fluent API. Basically I am building a tree of widgets by recursively walking the reflection data, and as I visit each field I want to construct a new path which is the concatenation of the parent path with the path segment for the field being visited.
What solution would you like?
Given a "base path" (which may be empty), I want to generate a new path which is the concatenation of the base plus a new element, which could be a name, index and so on. Similar to
path.join()
for directories.What alternative(s) have you considered?
I could do this by manipulating the Vec directly, but fluent methods would be cleaner.
The text was updated successfully, but these errors were encountered: