Closed
Description
What problem does this solve or what need does it fill?
There are cases where direct access to EntityRef/EntityMut is needed in an iterating context
What solution would you like?
An archetype-based solution, ideally we could have a &EntityRef or &mut EntityMut in queries, which would automatically imply exclusive world access thinking. (#5496 (comment))
What alternative(s) have you considered?
Iterating Entity (the ID) and calling World::entity. This solution works, but it is unintuitive and suffers from worse performance than a built-in solution for iterating EntityRef/EntityMut
Additional context
Original discussion: #5496