Module change_detection

Module change_detection 

Source
Expand description

Types that detect when their internal data mutate.

Structs§

CheckChangeTicks
An Event that can be used to maintain Ticks in custom data structures, enabling to make use of bevy’s periodic checks that clamps ticks to a certain range, preventing overflows and thus keeping methods like Tick::is_newer_than reliably return false for ticks that got too old.
ComponentTickCells
Interior-mutable access to the Ticks of a single component or resource.
ComponentTicks
Records when a component or resource was added and when it was last mutably dereferenced (or added).
MaybeLocation
A value that contains a T if the track_location feature is enabled, and is a ZST if it is not.
Mut
Unique mutable borrow of an entity’s component or of a resource.
MutUntyped
Unique mutable borrow of resources or an entity’s component.
NonSend
Shared borrow of a non-Send resource.
NonSendMut
Unique borrow of a non-Send resource.
Ref
Shared borrow of an entity’s component with access to change detection. Similar to Mut but is immutable and so doesn’t require unique access.
Res
Shared borrow of a Resource.
ResMut
Unique mutable borrow of a Resource.
Tick
A value that tracks when a system ran relative to other systems. This is used to power change detection.

Constants§

CHECK_TICK_THRESHOLD
The (arbitrarily chosen) minimum number of world tick increments between check_tick scans.
MAX_CHANGE_AGE
The maximum change tick difference that won’t overflow before the next check_tick scan.

Traits§

DetectChanges
Types that can read change detection information. This change detection is controlled by DetectChangesMut types such as ResMut.
DetectChangesMut
Types that implement reliable change detection.