Skip to main content

Module processor

Module processor 

Source
Expand description

The message dispatcher: routes messages to handlers by key.

A Processor holds a set of handlers keyed by message type (a MessageKey), plus a set of global handlers that run for every message. It dispatches each message through the matching handler chain and combines their responses.

Structs§

All
A pure flag whose only meaning is its name. Used as a handler key it resolves to 0, letting the call site register the handler as a global one via register_global.
Processor
The message dispatcher.

Traits§

MessageKey
The key that Processor used to look up the handlers for a message.

Functions§

default_bundle
Create a bundle from a request, with default state and response.
resolve_globals
Clone the global handlers into every key list and sort each list by priority.