Expand description
Reactive data structures — Core-level integration (M5.A — D177/D179).
Each structure wraps a backend trait behind a parking_lot::Mutex, owns a
state NodeId registered with Core, and emits DIRTY->DATA snapshots on
every mutation. Structures are standalone — no Graph dependency required.
Lock discipline (P1 fix): Mutation methods hold the inner lock only
during backend mutation and snapshot collection. The lock is dropped before
Core::emit() is called, so subscribers are free to read (but not mutate)
the structure during message delivery. The EmitHandle lives outside the
inner Mutex and uses AtomicU64 for thread-safe version counting.
Structs§
- Attach
Options - D270 —
AttachOptions { skip_cached_replay }(memo:Re P2 parity). Mirrors TSReactiveLogBundle.attach(upstream, opts?): whenskip_cached_replay = trueAND the upstream has a cached value (Core::cache_of(upstream)non-sentinel), drop the FIRST DATA- bearing batch the attach sink receives — i.e. the subscribe- handshake replay. Subsequent live emissions still land. A cold upstream’s first live emit is NOT dropped (thecache_ofcheck gates the suppression). The flag has no effect when the upstream’s cache is sentinel (no replay to skip). - Attach
Storage Handle - Handle to an attach-storage subscription. Call
AttachStorageHandle::detachto dispose it (no RAII — D246 r3). - Index
OutOf Bounds - Error returned when a list
insertorinsert_manyindex is out of bounds. - LogView
- Handle to a log view. Call
LogView::detachto dispose the view subscription (no RAII — D246 r3). - MapConfig
Error - Configuration validation error for
ReactiveMap. - Reactive
Index - Reactive sorted index with primary key lookup and secondary sort order.
- Reactive
Index Options - Options for constructing a
ReactiveIndex. - Reactive
List - Reactive ordered list.
- Reactive
List Options - Options for constructing a
ReactiveList. - Reactive
Log - Reactive append-only log with optional ring-buffer cap.
- Reactive
LogOptions - Options for constructing a
ReactiveLog. - Reactive
Map - Reactive key-value map.
- Reactive
MapOptions - Options for constructing a
ReactiveMap. - Reactive
Sub - D246 rule 3: NO RAII unsubscribe below the binding. A subscription
bundle that tracks its
(NodeId, SubscriptionId)subs and is torn down by the owner-invoked, synchronousReactiveSub::detach— notDrop. Carries no&Core(the'clifetime is gone); the owner passes its&Coreintodetach. - Retention
Policy - Score-based retention policy for
ReactiveMap. - Scan
Handle - Handle to a log scan. Call
ScanHandle::detachto dispose the scan subscription (no RAII — D246 r3). - Upsert
Options - Per-call upsert options for
ReactiveIndex::upsert.
Enums§
- View
Spec - View specification for
ReactiveLog::view.
Traits§
- Append
LogSink - Trait for append-log storage sinks used by
ReactiveLog::attach_storage.
Type Aliases§
- Index
Equals Fn - User-supplied equality function for upsert idempotency.
- Intern
Fn - User-supplied function that converts a snapshot value
Vec<T>(or similar) into aHandleIdfor Core emission. The binding owns the value registry; this closure capturesArc<Binding>and callsbinding.intern(snapshot).