JoJoJet / bevy-trait-query

adds trait queries to the bevy game engine
Apache License 2.0
71 stars 15 forks source link

Add a `#[queryable]` macro for generating trait query impls #6

Closed JoJoJet closed 1 year ago

JoJoJet commented 1 year ago

Added the attribute macro #[queryable] to generate trait query impls for a trait. This replaces the impl_trait_query! declarative macro. This also modifies the trait definition, adding various 'static bounds necessary for interfacing with bevy. As an escape hatch, this can be disabled by using the form #[queryable(no_bounds)], although I can not think of any actual uses for this.