bevy/crates/bevy_ecs/src
BD103 4dcee649eb Improve Query's top-level documentation (#18622)
# Objective

- There's been several changes to `Query` for this release cycle, and
`Query`'s top-level documentation has gotten slightly out-of-date.
- Alternative to #18615.

## Solution

- Edit `Query`'s docs for consistency, clarity, and correctness.
- Make sure to group `get()` and `get_many()` together instead of
`single()` and `get_many()`, to enforce the distinction from
https://github.com/bevyengine/bevy/pull/18615#issuecomment-2764355672.
- Reformat doc tests so they would be readable if extracted into their
own file. (Which mainly involves adding more spacing.)
- Move link definitions to be nearer where they are used.
- Fix the tables so they are up-to-date and correctly escape square
brackets `\[ \]`.

## Testing

I ran `cargo doc -p bevy_ecs --no-deps` to view the docs and `cargo test
-p bevy_ecs --doc` to test the doc comments.

## Reviewing

The diff is difficult to read, so I don't recommend _just_ looking at
that. Instead, run `cargo doc -p bevy_ecs --no-deps` locally and read
through the new version. It should theoretically read smoother with less
super-technical jargon. :)

## Follow-up

I want to go through some of `Query`'s methods, such as `single()`,
`get()`, and `get_many()`, but I'll leave that for another PR.

---------

Co-authored-by: Chris Russell <8494645+chescock@users.noreply.github.com>
2025-03-31 22:33:27 +02:00
..
entity Rename EntityBorrow/TrustedEntityBorrow to ContainsEntity/EntityEquivalent (#18470) 2025-03-30 10:24:00 +02:00
error Make system param validation rely on the unified ECS error handling via the GLOBAL_ERROR_HANDLER (#18454) 2025-03-25 22:59:01 +01:00
event bevy_reflect: Add clone registrations project-wide (#18307) 2025-03-17 18:32:35 +00:00
identifier bevy_reflect: Add clone registrations project-wide (#18307) 2025-03-17 18:32:35 +00:00
observer reexport entity set collections in entity module (#18413) 2025-03-30 10:24:00 +02:00
query Rename EntityBorrow/TrustedEntityBorrow to ContainsEntity/EntityEquivalent (#18470) 2025-03-30 10:24:00 +02:00
reflect Replace VisitEntities with MapEntities (#18432) 2025-03-24 00:09:29 +01:00
relationship Fix relationship macro for multiple named members fields (#18530) 2025-03-27 22:58:21 +01:00
schedule Fix run_system for adapter systems wrapping exclusive systems (#18406) 2025-03-26 19:06:51 +01:00
storage Queued component registration (#18173) 2025-03-10 21:46:27 +00:00
system Improve Query's top-level documentation (#18622) 2025-03-31 22:33:27 +02:00
world Rename EntityBorrow/TrustedEntityBorrow to ContainsEntity/EntityEquivalent (#18470) 2025-03-30 10:24:00 +02:00
archetype.rs Fix clippy::let_and_return in bevy_ecs (#18481) 2025-03-24 00:09:30 +01:00
batching.rs Fix *most* clippy lints (#15906) 2024-10-14 20:52:35 +00:00
bundle.rs Fix clippy::let_and_return in bevy_ecs (#18481) 2025-03-24 00:09:30 +01:00
change_detection.rs bevy_reflect: Add clone registrations project-wide (#18307) 2025-03-17 18:32:35 +00:00
component.rs Required Components: pass through all tokens in {} and () syntax (#18578) 2025-03-27 22:56:49 +01:00
entity_disabling.rs bevy_reflect: Add clone registrations project-wide (#18307) 2025-03-17 18:32:35 +00:00
hierarchy.rs Regression fix: Reintroduce sorting/reordering methods on Children (#18476) 2025-03-24 00:14:22 +01:00
intern.rs Move hashbrown and foldhash out of bevy_utils (#17460) 2025-01-23 16:46:08 +00:00
label.rs do_not_recommend interned Labels (#17950) 2025-02-25 23:46:21 +00:00
lib.rs Rename EntityBorrow/TrustedEntityBorrow to ContainsEntity/EntityEquivalent (#18470) 2025-03-30 10:24:00 +02:00
name.rs bevy_reflect: Add clone registrations project-wide (#18307) 2025-03-17 18:32:35 +00:00
removal_detection.rs bevy_reflect: Add clone registrations project-wide (#18307) 2025-03-17 18:32:35 +00:00
resource.rs Move Resource trait to its own file (#17469) 2025-01-21 19:47:08 +00:00
spawn.rs Implement SpawnableList for Vec<Bundle> (#18259) 2025-03-11 20:32:37 +00:00
traversal.rs Relationships (non-fragmenting, one-to-many) (#17398) 2025-01-18 22:20:30 +00:00