SignalMap

Trait SignalMap 

Source
pub trait SignalMap: SSs {
    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

Monadic registration facade for structs that encapsulate some System which is a valid member of the signal graph downstream of some source MutableBTreeMap; this is similar to Signal but critically requires that the System outputs Option<MapDiff<Self::Key, Self::Value>>.

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<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 + SSs,

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 + SSs, Switched::Value: Clone + SSs,

Source§

type Key = <Switched as SignalMap>::Key

Source§

type Value = <Switched as SignalMap>::Value