Expand description
Cached entities that share their fields between the views holding them.
Every view of an export receives the same patches, and a derived view holds
the entity its source view holds, so most cached copies of one entity have
the same fields. Each view’s frames carry their own _version (see the
projector), which a view’s copy keeps, so the copies differ in that one
field. A SharedEntity keeps every other field behind an Arc that the
copies share, and _version beside it, per copy. A change replaces or
copies the shared fields before it writes (copy-on-write), so it never
reaches another holder’s copy.
Structs§
- Shared
Entity - One copy of a cached entity: fields shared with every other copy that has
the same ones, plus this copy’s
_version.
Constants§
- VERSION_
FIELD - The field each view’s copy of an entity stamps with its own frame version.
Traits§
- Entity
Fields - Field access shared by plain values and
SharedEntitycopies.
Functions§
- lookup
- The value at
path, field names from the top ofentity; the whole entity for an empty path.Noneas soon as a step is missing.