Trait SignalReceiver

Source
pub trait SignalReceiver<Input, Output>: 'static
where Input: 'static, Output: 'static,
{ // Required method fn receive(&self, x: &Input) -> Output; }
Expand description

Receive changes to a signal.

Pass a SignalReceiver to ReadSignal::map_to, as an alternative to passing a closure to ReadSignal::map.

Required Methods§

Source

fn receive(&self, x: &Input) -> Output

Implementors§

Source§

impl<Input, Output, F> SignalReceiver<Input, Output> for F
where Input: 'static, Output: 'static, F: 'static + Fn(&Input) -> Output,

Source§

impl<T: 'static + Clone + Zero + WrappingAdd + WrappingSub> SignalReceiver<T, SumHandle> for SumElement<T>