SyncRequestHandler<Request, Response> typedef

SyncRequestHandler<Request, Response> = Response? Function(EventEnvelope<Request> e)

Synchronous handler function for request/response communication.

Like RequestHandler but guaranteed to return synchronously. Used with EventBus.onRequestSync and EventBus.requestSync. Same concession-by-null and throw-stops-chain rules apply: returning null concedes to the next handler regardless of whether Response is nullable; throwing stops the chain and propagates.

Implementation

typedef SyncRequestHandler<Request, Response> =
    Response? Function(EventEnvelope<Request> e);