Skip to main content

Module property_store

Module property_store 

Source
Expand description

Typed reactive property store with notify-on-write semantics.

The legacy crate::signals::Signals resource is a thin wrapper over this store keyed on PropertyKey::Global(name).

Structs§

BindingId
Identifier for a one-way / two-way PropertyStore::bind binding. Newtype-wrapped u64.
ListenerId
Identifier for an observer registered against a PropertyKey. Newtype-wrapped u64.
Property
Typed property handle. Wraps a PropertyKey with a phantom T so reads and writes never stringify.
PropertyCell
One stored property: the typed value, optional binding source, registered listeners, and a monotonic generation counter.
PropertyStore
Reactive typed property store. Replaces the legacy Signals: HashMap<String, String> with a notify-on-write store.

Enums§

PropertyKey
Stable key identifying a property cell.
PropertyValue
Typed property value. The Custom variant covers Rust types not enumerated here.

Functions§

clear_property_store_dirty
End-of-tick system that clears the PropertyStore dirty queue. Runs in crate::tick::TickStage::A11ySync after 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 calls PropertyStore::set so the cell gets the typed variant directly - no stringification, no Signals round-trip.
external_properties_pending
Returns true when 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 PropertyStore into the process-wide typed_property_snapshot cache. Pair with drain_external_properties in crate::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 PropertyStore cell mirrored by mirror_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.