Expand description
Typed reactive property store with notify-on-write semantics.
PropertyStoreis aResourceholding aHashMapofPropertyKey->PropertyCell.PropertyStore::setwrites the cell, bumps its generation, and records the key onto the per-tick dirty queue.- The per-tick dirty queue drives the observer systems: they read it with
PropertyStore::dirty_peekeach tick, and the end-of-tickclear_property_store_dirtysystem resets it.PropertyStore::drain_dirtyis the consuming variant for callers that want the entries. PropertyStore::freeze_notify/PropertyStore::thaw_notifygate the dirty queue across batched writes (e.g.<for>reconciler rewriting 1000 rows).
The legacy crate::signals::Signals resource is a thin wrapper over this store keyed on PropertyKey::Global(name).
Structs§
- Binding
Id - Identifier for a one-way / two-way
PropertyStore::bindbinding. Newtype-wrappedu64. - Listener
Id - Identifier for an observer registered against a
PropertyKey. Newtype-wrappedu64. - Property
- Typed property handle. Wraps a
PropertyKeywith a phantomTso reads and writes never stringify. - Property
Cell - One stored property: the typed value, optional binding source, registered listeners, and a monotonic generation counter.
- Property
Store - Reactive typed property store. Replaces the legacy
Signals: HashMap<String, String>with a notify-on-write store.
Enums§
- Property
Key - Stable key identifying a property cell.
- Property
Value - Typed property value. The
Customvariant covers Rust types not enumerated here.
Functions§
- clear_
property_ store_ dirty - End-of-tick system that clears the
PropertyStoredirty queue. Runs incrate::tick::TickStage::A11ySyncafter every consumer that peeks the queue (theme propagation, derivations, render-world frame dirty roll-up). - commit_
external_ properties - Second, in-
Systems-stage drain of the external typed-property bus, for same-tick commit of main-thread script writes. - drain_
external_ properties - Per-tick system that drains every queued typed-property write into
PropertyStore. Each entry callsPropertyStore::setso the cell gets the typed variant directly - no stringification, noSignalsround-trip. - external_
properties_ pending - Returns
truewhen the cross-thread typed-property channel currently holds undrained writes. - external_
property_ snapshot - Snapshot the cells currently visible to the external bus by polling the
channel non-destructively. Used by FFI typed reads that want to consult
pending pre-run writes without owning a
PropertyStore. The returned map is empty when the channel is unset or empty. - init_
external_ properties - Idempotently initialises the cross-thread typed-property channel. Safe to call multiple times.
- mirror_
property_ store_ to_ typed_ cache - Per-tick system that reflects every typed cell in
PropertyStoreinto the process-widetyped_property_snapshotcache. Pair withdrain_external_propertiesincrate::tick::TickStage::A11ySync(or any late-tick stage) so the mirror sees writes that arrived this tick. - push_
external_ property - Sends a typed
(PropertyKey, PropertyValue)write from any thread. - typed_
property_ snapshot - Cross-thread snapshot of every typed
PropertyStorecell mirrored bymirror_property_store_to_typed_cache. Returns the cache as owned data so callers can drop their lock immediately. FFI typed-read accessors consume this on their fallback path.