Skip to content

hecs::Query should handle type parameters #359

Description

@sanbox-irl

Basically I'd love this to work:

#[derive(hecs::Query)]
pub struct DrawSpriteQuery<'a, SpriteLike = Sprite> {
    pub transform: &'a Transform,
    pub sprite: &'a SpriteLike,
    pub shader_routine: &'a crate::gfx::ShaderRoutine,
    pub size: Option<&'a Size>,
}

I'll take a look in the macro to see how tough it would be, but I suspect not terribly difficult, but not sure!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions