Skip to main content

Module dispatch

Module dispatch 

Source
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§

DynCompletionHandler
Object-safe form of CompletionHandler.
DynPromptHandler
Object-safe form of PromptHandler (only the dispatched methods).
DynResourceHandler
Object-safe form of ResourceHandler (only the dispatched methods).
DynTaskHandler
Object-safe form of TaskHandler.
DynToolHandler
Object-safe form of ToolHandler (only the dispatched methods).
PromptSlot
A prompt-handler slot.
ResourceSlot
A resource-handler slot.
TaskSlot
A task-handler slot.
ToolSlot
A tool-handler slot.