Skip to main content

SignalMap

Trait SignalMap 

Source
pub trait SignalMap:
    Send
    + Sync
    + 'static {
    type Key;
    type Value;

    // Required method
    fn register_boxed_signal_map(
        self: Box<Self>,
        world: &mut World,
    ) -> SignalHandle;

    // Provided method
    fn register_signal_map(self, world: &mut World) -> SignalHandle
       where Self: Sized { ... }
}
Expand description

A composable node in jonmo’s reactive dependency graph, specialized for diff-based BTreeMap reactivity.

Unlike Signal which forwards complete values, a SignalMap propagates MapDiff values describing incremental mutations to an underlying keyed collection. This diff-based approach enables constant-time reactive updates regardless of map size; only the changes are transmitted and processed, not the entire map.

Downstream consumers receive a stream of MapDiff variants (Insert, Update, Remove, etc.) that they can apply to maintain a synchronized view of the source data.

For the general signal graph runtime model, registration pattern, flow control semantics, and composition strategies, see the Signal trait documentation, which also applies to SignalMap.

Required Associated Types§

Required Methods§

Source

fn register_boxed_signal_map(self: Box<Self>, world: &mut World) -> SignalHandle

Registers the Systems associated with this SignalMap by consuming its boxed form.

All concrete signal map types must implement this method.

Provided Methods§

Source

fn register_signal_map(self, world: &mut World) -> SignalHandle
where Self: Sized,

Registers the Systems associated with this SignalMap.

Trait Implementations§

Source§

impl<K: 'static, V: 'static> SignalMap for Box<dyn SignalMap<Key = K, Value = V> + Send + Sync>

Source§

type Key = K

Source§

type Value = V

Source§

fn register_boxed_signal_map(self: Box<Self>, world: &mut World) -> SignalHandle

Registers the Systems associated with this SignalMap by consuming its boxed form. Read more
Source§

fn register_signal_map(self, world: &mut World) -> SignalHandle
where Self: Sized,

Registers the Systems associated with this SignalMap.

Implementations on Foreign Types§

Source§

impl<K: 'static, V: 'static> SignalMap for Box<dyn SignalMap<Key = K, Value = V> + Send + Sync>

Source§

type Key = K

Source§

type Value = V

Source§

fn register_boxed_signal_map(self: Box<Self>, world: &mut World) -> SignalHandle

Source§

impl<K: 'static, V: 'static> SignalMap for Box<dyn SignalMapDynClone<Key = K, Value = V> + Send + Sync>

Source§

type Key = K

Source§

type Value = V

Source§

fn register_boxed_signal_map(self: Box<Self>, world: &mut World) -> SignalHandle

Implementors§

Source§

impl<K, V> SignalMap for Source<K, V>
where K: 'static, V: 'static,

Source§

type Key = K

Source§

type Value = V

Source§

impl<K, V, L, R> SignalMap for SignalMapEither<L, R>
where L: SignalMap<Key = K, Value = V>, R: SignalMap<Key = K, Value = V>,

Source§

type Key = K

Source§

type Value = V

Source§

impl<Sched: 'static, K: Send + Sync + 'static, V: Send + Sync + 'static> SignalMap for ScheduledMap<Sched, K, V>

Source§

type Key = K

Source§

type Value = V

Source§

impl<Upstream> SignalMap for Debug<Upstream>
where Upstream: SignalMap,

Source§

type Key = <Upstream as SignalMap>::Key

Source§

type Value = <Upstream as SignalMap>::Value

Source§

impl<Upstream, O> SignalMap for MapValue<Upstream, O>
where Upstream: SignalMap, O: 'static,

Source§

type Key = <Upstream as SignalMap>::Key

Source§

type Value = O

Source§

impl<Upstream, S> SignalMap for MapValueSignal<Upstream, S>
where Upstream: SignalMap, S: Signal + 'static, S::Item: Clone + Send + Sync + 'static,

Source§

type Key = <Upstream as SignalMap>::Key

Source§

type Value = <S as Signal>::Item

Source§

impl<Upstream, Switched> SignalMap for SwitchSignalMap<Upstream, Switched>
where Upstream: Signal, Switched: SignalMap, Switched::Key: Clone + Send + Sync + 'static, Switched::Value: Clone + Send + Sync + 'static,

Source§

type Key = <Switched as SignalMap>::Key

Source§

type Value = <Switched as SignalMap>::Value