How a plugin says something happened, and hears that something did.
A topic is paired with its payload in the type system, so a publisher and a subscriber cannot disagree about the shape without the compiler saying so.
Says a topic carried this payload, to whoever is listening and to nobody in particular.
the topic's payload type
the topic to publish on
the event payload
Hears this topic until the returned function is called.
the topic to listen on
called with each payload published on topic
topic
a function that stops the subscription when called
How a plugin says something happened, and hears that something did.
Remarks
A topic is paired with its payload in the type system, so a publisher and a subscriber cannot disagree about the shape without the compiler saying so.