A Tracked field inside a derived PartialEq or serde type (a brush's tip inside its settings) compares by value and
saves as its value; a loaded one starts a new source.
A place's address names it in its pass only: a record kept for a later pass (a memoized view's) keeps no
BindKey::Place read and its replay notes none, while a measure-only record used within its pass keeps them.
State more than one part shows or edits is Tracked: a bind_tracked! binding keys by the value's source and the
field's offset (BindKey::Tracked), in its read, its edit and its memo key, so a replay in a later pass re-notes the
read and an edit later in the pass reruns it. StoryData::bind binds a story value the same way, and the Properties
editor binds and notes its edits through it. The memo_settled reader and editor share a Tracked value.
bind_tracked!(doc => title, style.size) splits the Tracked into its value and
its write count (a Cell over the count) and gives each field path its own
write-through binding, so the borrow checker rejects overlapping paths. A
binding moves the count at each write that changes its field; making and
reading bindings every pass leaves the revision. Bind::tracked, Field, Place,
Projection and field! are gone: this is the one way to bind a tracked field.
The impl bounds each type parameter by the derive's trait, and every field is
checked under those bounds, so a generic recursive type derives without
overflowing and a Cell<T> field fails at the derive, naming the field. A field
type written with Self is checked as the type itself. The escape is an Escape
{ attr, keyword } parsed by escaped(), and the check item is a separate output a
derive may leave out. A direct craft-tracked dependency is preferred over the
facade when finding the crate path.
Tracked<T> owns its value, a process-unique source id and a write count. Deref
reads; DerefMut, edit and a Field's writes move the count, and a clone is a new
source. T must be PlainData, a marker with no implementation for interior
mutability, raw pointers, dyn objects or closures, so no write can bypass the
count. #[derive(PlainData)] in ui-macros checks every field through a field-check
helper the plain-data derives share; #[plain_data(assume = "reason")] skips one
field of a foreign plain type.
field!(a.b) builds a read and a write projection from a field path only.
Bind::tracked(&mut t, field!(a.b)) reads through the read projection and moves
the revision only when an edit changes the field.