Struct armature::commutator::Commutator [−][src]
pub struct Commutator<E, S> where
E: IsEvent<Event = E, Sig = S>,
S: IsSig<Sig = S>, { pub handlers: HashMap<usize, Box<dyn Handler<Event = E, Sig = S>>>, pub event_map: HashMap<S, HashSet<usize>>, // some fields omitted }
Expand description
The commutator dispatches events to the stators attached to it.
Fields
handlers: HashMap<usize, Box<dyn Handler<Event = E, Sig = S>>>
event_map: HashMap<S, HashSet<usize>>
Implementations
Attach an event handler to the commutator
Detach an event handler from the commutator.
Get a mutable reference to an event handler.
Auto Trait Implementations
impl<E, S> !RefUnwindSafe for Commutator<E, S>
impl<E, S> Send for Commutator<E, S>
impl<E, S> !Sync for Commutator<E, S>
impl<E, S> Unpin for Commutator<E, S> where
S: Unpin,
impl<E, S> !UnwindSafe for Commutator<E, S>