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§
- Message
Key - The key that
Processorused 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.