Expose query accesses#11700
Conversation
alice-i-cecile
left a comment
There was a problem hiding this comment.
And so we inch closer to the access model laid out in bevyengine/rfcs#30 :D
I agree with this direction, and this PR is useful both as an ECS primitive and as something we can expose to users. I'd like to clean up the explanation and docs a bit further before merging.
Ideally we'd have module level documentation explaining the different kinds of access and how they relate to each other, but I won't block on that in this PR.
alice-i-cecile
left a comment
There was a problem hiding this comment.
Solid stuff. One small set of suggestions to clarify further, but I'm happy with this now.
Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
I'll think on what I would write here, but I probably won't include anything in this PR since module-level documentation generally requires a lot more thought than method-level documentation. |
Objective
It would be useful to be able to inspect a
QueryState's accesses so we can detect when the data it accesses changes without having to iterate it. However there are two things preventing this:Has<T>indirectly accessesT, but does not register it.Solution
QueryState.