There is Archetype::access method for a query, and it can tell if the entities are mutated or not. What I want is a way to enforce borrowing rules at run-time, when implementing a scheduler. This means, for example, that query A can mutate component X, while query B mutates component Y, at the same time. The current access API would just tell me that both A and B mutate the entities, which is insufficient to know if they can be done together.
The function I need would return a list (or an iterator) of pairs (component, access) for a given query.
There is Archetype::access method for a query, and it can tell if the entities are mutated or not. What I want is a way to enforce borrowing rules at run-time, when implementing a scheduler. This means, for example, that query A can mutate component X, while query B mutates component Y, at the same time. The current
accessAPI would just tell me that both A and B mutate the entities, which is insufficient to know if they can be done together.The function I need would return a list (or an iterator) of pairs (component, access) for a given query.