Update docs for NextState (#13578)

# Objective

Fixes #13577.

## Solution

Explain how the resource works now.

Co-authored-by: Alice Cecile <alice.i.cecil@gmail.com>
This commit is contained in:
Alice Cecile 2024-05-30 15:51:02 -04:00 committed by GitHub
parent a3e60d39b7
commit 61af3d231b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -85,7 +85,8 @@ impl<S: States> Deref for State<S> {
/// The next state of [`State<S>`].
///
/// To queue a transition, just set the contained value to `Some(next_state)`.
/// This can be fetched as a resource and used to queue state transitions.
/// To queue a transition, call [`NextState::set`] or mutate the value to [`NextState::Pending`] directly.
///
/// Note that these transitions can be overridden by other systems:
/// only the actual value of this resource at the time of [`apply_state_transition`](crate::state::apply_state_transition) matters.