Trait SignalReceiver

pub trait SignalReceiver<I, Ps>: 'static {
    // Required method
    fn call(&mut self, maybe_instance: I, params: Ps);
}
Expand description

Trait that is implemented for functions that can be connected to signals.

This is used in ConnectBuilder. There are three variations of the I (instance) parameter:

  • () for global and associated (“static”) functions.
  • &C for &self methods.
  • &mut C for &mut self methods.

See also Signals in the book.

Required Methods§

fn call(&mut self, maybe_instance: I, params: Ps)

Invoke the receiver on the given instance (possibly ()) with params.

Implementors§

§

impl<F, R> SignalReceiver<(), ()> for F
where F: FnMut() -> R + 'static,

§

impl<F, R, C> SignalReceiver<&C, ()> for F
where F: FnMut(&C) -> R + 'static,

§

impl<F, R, C> SignalReceiver<&mut C, ()> for F
where F: FnMut(&mut C) -> R + 'static,

§

impl<F, R, C, P0> SignalReceiver<&C, (P0,)> for F
where F: FnMut(&C, P0) -> R + 'static,

§

impl<F, R, C, P0> SignalReceiver<&mut C, (P0,)> for F
where F: FnMut(&mut C, P0) -> R + 'static,

§

impl<F, R, C, P0, P1> SignalReceiver<&C, (P0, P1)> for F
where F: FnMut(&C, P0, P1) -> R + 'static,

§

impl<F, R, C, P0, P1> SignalReceiver<&mut C, (P0, P1)> for F
where F: FnMut(&mut C, P0, P1) -> R + 'static,

§

impl<F, R, C, P0, P1, P2> SignalReceiver<&C, (P0, P1, P2)> for F
where F: FnMut(&C, P0, P1, P2) -> R + 'static,

§

impl<F, R, C, P0, P1, P2> SignalReceiver<&mut C, (P0, P1, P2)> for F
where F: FnMut(&mut C, P0, P1, P2) -> R + 'static,

§

impl<F, R, C, P0, P1, P2, P3> SignalReceiver<&C, (P0, P1, P2, P3)> for F
where F: FnMut(&C, P0, P1, P2, P3) -> R + 'static,

§

impl<F, R, C, P0, P1, P2, P3> SignalReceiver<&mut C, (P0, P1, P2, P3)> for F
where F: FnMut(&mut C, P0, P1, P2, P3) -> R + 'static,

§

impl<F, R, C, P0, P1, P2, P3, P4> SignalReceiver<&C, (P0, P1, P2, P3, P4)> for F
where F: FnMut(&C, P0, P1, P2, P3, P4) -> R + 'static,

§

impl<F, R, C, P0, P1, P2, P3, P4> SignalReceiver<&mut C, (P0, P1, P2, P3, P4)> for F
where F: FnMut(&mut C, P0, P1, P2, P3, P4) -> R + 'static,

§

impl<F, R, C, P0, P1, P2, P3, P4, P5> SignalReceiver<&C, (P0, P1, P2, P3, P4, P5)> for F
where F: FnMut(&C, P0, P1, P2, P3, P4, P5) -> R + 'static,

§

impl<F, R, C, P0, P1, P2, P3, P4, P5> SignalReceiver<&mut C, (P0, P1, P2, P3, P4, P5)> for F
where F: FnMut(&mut C, P0, P1, P2, P3, P4, P5) -> R + 'static,

§

impl<F, R, C, P0, P1, P2, P3, P4, P5, P6> SignalReceiver<&C, (P0, P1, P2, P3, P4, P5, P6)> for F
where F: FnMut(&C, P0, P1, P2, P3, P4, P5, P6) -> R + 'static,

§

impl<F, R, C, P0, P1, P2, P3, P4, P5, P6> SignalReceiver<&mut C, (P0, P1, P2, P3, P4, P5, P6)> for F
where F: FnMut(&mut C, P0, P1, P2, P3, P4, P5, P6) -> R + 'static,

§

impl<F, R, C, P0, P1, P2, P3, P4, P5, P6, P7> SignalReceiver<&C, (P0, P1, P2, P3, P4, P5, P6, P7)> for F
where F: FnMut(&C, P0, P1, P2, P3, P4, P5, P6, P7) -> R + 'static,

§

impl<F, R, C, P0, P1, P2, P3, P4, P5, P6, P7> SignalReceiver<&mut C, (P0, P1, P2, P3, P4, P5, P6, P7)> for F
where F: FnMut(&mut C, P0, P1, P2, P3, P4, P5, P6, P7) -> R + 'static,

§

impl<F, R, C, P0, P1, P2, P3, P4, P5, P6, P7, P8> SignalReceiver<&C, (P0, P1, P2, P3, P4, P5, P6, P7, P8)> for F
where F: FnMut(&C, P0, P1, P2, P3, P4, P5, P6, P7, P8) -> R + 'static,

§

impl<F, R, C, P0, P1, P2, P3, P4, P5, P6, P7, P8> SignalReceiver<&mut C, (P0, P1, P2, P3, P4, P5, P6, P7, P8)> for F
where F: FnMut(&mut C, P0, P1, P2, P3, P4, P5, P6, P7, P8) -> R + 'static,

§

impl<F, R, C, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9> SignalReceiver<&C, (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9)> for F
where F: FnMut(&C, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) -> R + 'static,

§

impl<F, R, C, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9> SignalReceiver<&mut C, (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9)> for F
where F: FnMut(&mut C, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) -> R + 'static,

§

impl<F, R, P0> SignalReceiver<(), (P0,)> for F
where F: FnMut(P0) -> R + 'static,

§

impl<F, R, P0, P1> SignalReceiver<(), (P0, P1)> for F
where F: FnMut(P0, P1) -> R + 'static,

§

impl<F, R, P0, P1, P2> SignalReceiver<(), (P0, P1, P2)> for F
where F: FnMut(P0, P1, P2) -> R + 'static,

§

impl<F, R, P0, P1, P2, P3> SignalReceiver<(), (P0, P1, P2, P3)> for F
where F: FnMut(P0, P1, P2, P3) -> R + 'static,

§

impl<F, R, P0, P1, P2, P3, P4> SignalReceiver<(), (P0, P1, P2, P3, P4)> for F
where F: FnMut(P0, P1, P2, P3, P4) -> R + 'static,

§

impl<F, R, P0, P1, P2, P3, P4, P5> SignalReceiver<(), (P0, P1, P2, P3, P4, P5)> for F
where F: FnMut(P0, P1, P2, P3, P4, P5) -> R + 'static,

§

impl<F, R, P0, P1, P2, P3, P4, P5, P6> SignalReceiver<(), (P0, P1, P2, P3, P4, P5, P6)> for F
where F: FnMut(P0, P1, P2, P3, P4, P5, P6) -> R + 'static,

§

impl<F, R, P0, P1, P2, P3, P4, P5, P6, P7> SignalReceiver<(), (P0, P1, P2, P3, P4, P5, P6, P7)> for F
where F: FnMut(P0, P1, P2, P3, P4, P5, P6, P7) -> R + 'static,

§

impl<F, R, P0, P1, P2, P3, P4, P5, P6, P7, P8> SignalReceiver<(), (P0, P1, P2, P3, P4, P5, P6, P7, P8)> for F
where F: FnMut(P0, P1, P2, P3, P4, P5, P6, P7, P8) -> R + 'static,

§

impl<F, R, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9> SignalReceiver<(), (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9)> for F
where F: FnMut(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) -> R + 'static,