[][src]Trait sigs_slots::Signal

pub trait Signal<T> {
    fn connect(&mut self, slot: Rc<RefCell<dyn Slot<T>>>);
fn emit(&mut self, event: Event<T>); }

Generic Signal trait to be implemented by the object emitting the signals

Required methods

fn connect(&mut self, slot: Rc<RefCell<dyn Slot<T>>>)

Connects the given slot to this signal's list of consumers

Arguments

  • 'slot' - An Rc wrapped RefCell containing the slot to be connected

fn emit(&mut self, event: Event<T>)

Emits the given signal to all connected slots

Arguments

  • 'event' - the event to be sent to the slots
Loading content...

Implementors

Loading content...