[−][src]Trait psbus::sync::Publisher
A generic, thread-safe Publisher
which publishes events E
of category T
to a list of Subscribers
via an EventBus
.
-
T
is meant to be implemented by the module consumer as an enum, depicting the various categories an event can belong to. -
E
is meant to be implemented by the module consumer as an enum, depicting the individual events which exist in the system. SeeEvent
.
Provided methods
fn publish_event(
&self,
event: &E,
bus: &mut EventBus<T, E>
) -> EventDispatchResult
&self,
event: &E,
bus: &mut EventBus<T, E>
) -> EventDispatchResult