Skip to main content

Module reactive

Module reactive 

Source
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§

AttachStorageHandle
Handle to an attach-storage subscription. Dropping disposes the subscription.
IndexOutOfBounds
Error returned when a list insert or insert_many index is out of bounds.
LogView
Handle to a log view. Dropping disposes the view subscription.
MapConfigError
Configuration validation error for ReactiveMap.
ReactiveIndex
Reactive sorted index with primary key lookup and secondary sort order.
ReactiveIndexOptions
Options for constructing a ReactiveIndex.
ReactiveList
Reactive ordered list.
ReactiveListOptions
Options for constructing a ReactiveList.
ReactiveLog
Reactive append-only log with optional ring-buffer cap.
ReactiveLogOptions
Options for constructing a ReactiveLog.
ReactiveMap
Reactive key-value map.
ReactiveMapOptions
Options for constructing a ReactiveMap.
RetentionPolicy
Score-based retention policy for ReactiveMap.
ScanHandle
Handle to a log scan. Dropping disposes the scan subscription.
UpsertOptions
Per-call upsert options for ReactiveIndex::upsert.

Enums§

ViewSpec
View specification for ReactiveLog::view.

Traits§

AppendLogSink
Trait for append-log storage sinks used by ReactiveLog::attach_storage.

Type Aliases§

IndexEqualsFn
User-supplied equality function for upsert idempotency.
InternFn
User-supplied function that converts a snapshot value Vec<T> (or similar) into a HandleId for Core emission. The binding owns the value registry; this closure captures Arc<Binding> and calls binding.intern(snapshot).