Holds the adapters by platform. get fails NoAdapter for a
platform with none; registering a second adapter for a platform
replaces the first.
Attributes#
| Attribute | Type | Description |
|---|---|---|
descriptors | Effect[tuple[Descriptor, ...]] | The descriptors of every registered adapter. |
Functions#
register#
register(adapter) -> Effect[None]| Parameter | Type | Description |
|---|---|---|
adapter | ChatAdapter |
Returns Effect[None]
def register(self, adapter: ChatAdapter) -> Effect[None]: ...get#
get(platform) -> Effect[ChatAdapter, ChatError]The adapter for platform; NoAdapter when none is registered.
| Parameter | Type | Description |
|---|---|---|
platform | str |
Returns Effect[ChatAdapter, ChatError]
def get(self, platform: str) -> Effect[ChatAdapter, ChatError]:
"""The adapter for ``platform``; ``NoAdapter`` when none is registered."""
...