Handler<T> typedef

Handler<T> = Future<void> Function(EventDTO<T> dto, T? lastData)

Handler function type for processing events. The handler receives the event data and the last data from the same topic. If the handler completes but doesn't call EventDTO.completer, EventNode returns null (EventDTO.completer(null)) to the sender.

Implementation

typedef Handler<T> = Future<void> Function(EventDTO<T> dto, T? lastData);