Skip to content

#[derive(Query)] #786

Closed
Closed
@entropylost

Description

@entropylost

What problem does this solve or what need does it fill?

Giant tuples within query (Query<(&Foo, &Bar, &mut Baz)>) is really annoying as then everything has to be referenced by .0, etc, and if I decide to add Entity to the list I have to shift everything.

Describe the solution would you like?

Make a derive macro #[derive(Query)] which implements HecsQuery for the structure in question; as such the structure can be used as a query.

Describe the alternative(s) you've considered?

None.

Additional context

This could also support Or by allowing deriving an enum.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ECSEntities, components, systems, and eventsC-FeatureA new feature, making something new possibleC-UsabilityA targeted quality-of-life change that makes Bevy easier to use

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions