Event
struct Event<Message>
Declare events to be used as endpoints for publish or subscribe calls.
Example:
static let SomeEvent = Causality.Event<Int>(name: "Some Event")
This declares SomeEvent as an event that will require an Int on publish and will pass the same Int to the subscription handler.
-
nameprovides some context on the purpose of the event. It does not have to be unique. However, events of the same “name” will not be called even if they have the same message type.Declaration
Swift
public let name: String
Event Structure Reference