bevy icon indicating copy to clipboard operation
bevy copied to clipboard

Add reflection support for VecDeque

Open ItsDoot opened this issue 3 years ago • 9 comments

Objective

Fixes #5791

Solution

Implemented all the required reflection traits for VecDeque, taking from Vec's impls.

ItsDoot avatar Aug 25 '22 07:08 ItsDoot

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.

MrGVSV avatar Aug 25 '22 16:08 MrGVSV

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.

djeedai avatar Aug 26 '22 20:08 djeedai

bors r+

alice-i-cecile avatar Sep 07 '22 00:09 alice-i-cecile

Build failed:

bors[bot] avatar Sep 07 '22 00:09 bors[bot]

bors retry

alice-i-cecile avatar Sep 19 '22 15:09 alice-i-cecile

Build failed (retrying...):

bors[bot] avatar Sep 19 '22 16:09 bors[bot]

Build failed (retrying...):

bors[bot] avatar Sep 19 '22 16:09 bors[bot]

Build failed:

bors[bot] avatar Sep 19 '22 16:09 bors[bot]

@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!

mockersf avatar Sep 19 '22 17:09 mockersf

This PR has been adopted as #6831.

james7132 avatar Dec 03 '22 05:12 james7132