bevy/crates/bevy_ecs/src/system
Federico Rinaldi d9e99cd80c Fix API docs for Commands methods (#5955)
# Objective

The doc comments for `Command` methods are a bit inconsistent on the format, they sometimes go out of scope, and most importantly they are wrong, in the sense that they claim to perform the action described by the command, while in reality, they just push a command to perform the action.

- Follow-up of #5938.
- Related to #5913.

## Solution

- Where applicable, only stated that a `Command` is pushed.
- Added a “See also” section for similar methods.
- Added a missing “Panics” section for `Commands::entity`.
- Removed a wrong comment about `Commands::get_or_spawn` returning `None` (It does not return an option).
- Removed polluting descriptions of other items.
- Misc formatting changes.

## Future possibilities

Since the `Command` implementors (`Spawn`, `InsertBundle`, `InitResource`, ...) are public, I thought that it might be appropriate to describe the action of the command there instead of the method, and to add a `method → command struct` link to fill the gap.

If that seems too far-fetched, we may opt to make them private, if possible, or `#[doc(hidden)]`.
2022-09-21 17:37:57 +00:00
..
commands Fix API docs for Commands methods (#5955) 2022-09-21 17:37:57 +00:00
exclusive_system.rs Make Resource trait opt-in, requiring #[derive(Resource)] V2 (#5577) 2022-08-08 21:36:35 +00:00
function_system.rs Added the ability to get or set the last change tick of a system. (#5838) 2022-08-31 01:53:15 +00:00
mod.rs Remove last uses of string-labels (#5420) 2022-09-03 18:06:41 +00:00
query.rs Query filter types must be ReadOnlyWorldQuery (#6008) 2022-09-18 23:52:01 +00:00
system_chaining.rs Added the ability to get or set the last change tick of a system. (#5838) 2022-08-31 01:53:15 +00:00
system_param.rs Query filter types must be ReadOnlyWorldQuery (#6008) 2022-09-18 23:52:01 +00:00
system.rs Added the ability to get or set the last change tick of a system. (#5838) 2022-08-31 01:53:15 +00:00