JoJoJet / bevy-trait-query

adds trait queries to the bevy game engine
Apache License 2.0
65 stars 11 forks source link

Support associated types in trait queries #13

Closed JoJoJet closed 1 year ago

JoJoJet commented 1 year ago

Modified the derive macro to support traits with associated types.

JoJoJet commented 1 year ago

@istanbul-not-constantinople Does this remove the need for the workaround you mentioned in #11 ?

soqb commented 1 year ago

Wow! That was fast!

Yes it does! I was also using the generic trait for encapsulation, so that users of my library cannot perform their own trait queries on my traits, which this PR also helps with (it could now be associated as well, rather than generic), but this PR made me realize that I might as well give users the ability to query my traits since there are no internal guarantees made about them.