-
I'd like to implement Reflect and all the related traits on the EnumSet type defined in https://crates.io/crates/enumset. I expect EnumSet's reflection to act just like a HashSet. Are there any helper macros or methods I can use to make this work? I could implement it all manually, but that seems to be discouraged. Even if I modified the enumset crate, it seems like I'd still struggle to make it act like a Set and not something else. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Unfortunately this isn't supported yet. Ideally we'd be able to do this via the derive macro (via a So in this case, the only way to implement |
Beta Was this translation helpful? Give feedback.
Unfortunately this isn't supported yet. Ideally we'd be able to do this via the derive macro (via a
#[reflect(kind = Set)]
attribute) but right now it doesn't exist.So in this case, the only way to implement
Set
is to do it yourself. You can take a look at how we do that forHashSet
in the repo as a reference :)