bevy
bevy copied to clipboard
Add reflection support for VecDeque
Objective
Fixes #5791
Solution
Implemented all the required reflection traits for VecDeque, taking from Vec's impls.
Hm, this is an interesting one because it's a slightly different data structure. We sorta lose its usefulness (the queue properties) when reflecting, and we can only really get it back after casting back to its original type (or providing TypeData to use it).
Is it okay that we dumb all these structures down to their base types (List/Map)? Should they instead be considered Value types like HashSet? I think this is fine, but I'd like to hear if anyone has any other thoughts on this matter.
Is it okay that we dumb all these structures down to their base types (List/Map)? Should they instead be considered Value types like HashSet? I think this is fine, but I'd like to hear if anyone has any other thoughts on this matter.
Dumbing down is the "standard" way in my experience. The serde model also hints at that.
bors r+
bors retry
@ItsDoot merging this PR fails because of missing implementations of drain and pop which were added in #5728 and #5797.
Could you add those? thanks!
This PR has been adopted as #6831.