Expand description
Object-safe dispatch layer.
The public handler traits (ToolHandler et al.) return impl Future
(RPITIT) and so are not object-safe, which previously forced request routing
into a combinatorial per-handler-combination typestate macro. The Dyn*
traits here box the handler futures so a single router impl can dispatch any
registered handler, and the *Slot traits expose “the registered handler,
or None” uniformly across the typestate slots (Registered<H> /
NotRegistered).
Adding a dispatched capability is then one Dyn/Slot pair plus one match
arm — no combinatorial growth.
Traits§
- DynCompletion
Handler - Object-safe form of
CompletionHandler. - DynPrompt
Handler - Object-safe form of
PromptHandler(only the dispatched methods). - DynResource
Handler - Object-safe form of
ResourceHandler(only the dispatched methods). - DynTask
Handler - Object-safe form of
TaskHandler. - DynTool
Handler - Object-safe form of
ToolHandler(only the dispatched methods). - Prompt
Slot - A prompt-handler slot.
- Resource
Slot - A resource-handler slot.
- Task
Slot - A task-handler slot.
- Tool
Slot - A tool-handler slot.