Skip to main content

Module signal_map

Module signal_map 

Source
Expand description

Data structures and combinators for constructing reactive System dependency graphs on top of BTreeMap mutations.

This module provides SignalMap, a collection-oriented signal trait with diff-based semantics. Rather than forwarding entire maps each frame, SignalMap propagates MapDiff values that describe incremental mutations (insert, update, remove, etc.). This enables efficient, constant-time reactive updates for keyed collections of any size.

See MutableBTreeMap for the primary source type and SignalMapExt for available combinators. For the general signal graph runtime model and core concepts, see the Signal trait documentation.

Structs§

Debug
Signal graph node that debug logs its upstream’s “raw” Vec<MapDiff>s, see .debug.
ForEach
Signal graph node which applies a System directly to the “raw” Vec<MapDiff>s of its upstream, see .for_each.
Key
Signal graph node which maps its upstream SignalVec to a Key-lookup Signal, see .key.
MapValue
Signal graph node which applies a System to each Value of its upstream, see .map_value.
MapValueSignal
Signal graph node which applies a System to each Value of its upstream, forwarding the output of each resulting Signal, see .map_value.
MutableBTreeMap
Wrapper around a BTreeMap that emits mutations as MapDiffs, enabling diff-less constant-time reactive updates for downstream SignalMaps.
MutableBTreeMapBuilder
Builder for constructing a MutableBTreeMap.
MutableBTreeMapData
Component that holds the actual state for a MutableBTreeMap.
MutableBTreeMapReadGuard
Provides immutable access to the underlying BTreeMap.
MutableBTreeMapWriteGuard
Provides limited mutable access to the underlying BTreeMap.
ScheduledMap
Signal map node wrapper that assigns a schedule to a signal chain, see .schedule.
SignalVecEntries
Signal graph node which maps its upstream MutableBTreeMap to a SignalVec of its sorted (key, value)s, see .signal_vec_entries.
SignalVecKeys
Signal graph node with no upstreams which outputs some MutableBTreeMap’s sorted Keys as a SignalVec, see .signal_vec_keys.
Source
Signal graph node with no upstreams which forwards Vec<MapDiff<K, V>>s flushed from some source MutableBTreeMap<K, V>, see MutableBTreeMap::signal_map.

Enums§

MapDiff
Describes the mutations made to the underlying MutableBTreeMap that are piped to downstream SignalMaps.
SignalMapEither
Enables returning different concrete SignalMap types from branching logic without boxing, although note that all SignalMaps are boxed internally regardless.

Traits§

IntoSignalMapEither
Blanket trait for transforming SignalMaps into SignalMapEither::Left or SignalMapEither::Right.
ReadMutableBTreeMapData
Specifies read accessors for MutableBTreeMaps.
SignalMap
A composable node in jonmo’s reactive dependency graph, specialized for diff-based BTreeMap reactivity.
SignalMapDynClone
An extension trait for SignalMap types that implement Clone.
SignalMapExt
Extension trait providing combinator methods for SignalMaps.
WriteMutableBTreeMapData
Specifies write accessors for MutableBTreeMaps.