MethodCallback¶
Canonical path: o6.server.MethodCallback
MethodCallback
dataclass
¶
Bases: Protocol
The shape of a Method implementation.
Registered with o6.call, Server.addMethod, or
Server.implement. The callback may be a coroutine function, in which case
the server awaits it on its own event loop.
See Methods.
Functions¶
__call__
¶
Run the Method.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node
|
ObjectNode
|
The Object the Method was called on. |
required |
inputs
|
Any
|
The decoded InputArguments, in declaration order. |
()
|
Returns:
| Type | Description |
|---|---|
tuple[Any, ...] | Awaitable[tuple[Any, ...]]
|
A tuple of the StatusCode followed by the OutputArguments. |