class ServiceDefinition:
Constructor: ServiceDefinition.from_class(user_class, name)
Internal representation of a user's service definition class.
A named collection of named operation definitions.
A service definition class is a class decorated with nexusrpc.service
containing class attribute type annotations of type nexusrpc.Operation
.
Static Method | from |
Create a ServiceDefinition from a user service definition class. |
Method | __post |
Undocumented |
Class Variable | name |
Undocumented |
Class Variable | operation |
Undocumented |
Static Method | _collect |
Collect operation definitions from a user service definition class. |
Method | _validation |
Undocumented |
Create a ServiceDefinition from a user service definition class.
The set of service definition operations returned is the union of operations defined directly on this class with those inherited from ancestral service definitions (i.e. ancestral classes that were decorated with @nexusrpc.service). If multiple service definitions define an operation with the same name, then the usual mro() precedence rules apply.
type[ ServiceT]
) -> dict[ str, OperationDefinition[ Any, Any]]
:
¶
Collect operation definitions from a user service definition class.
Does not visit parent classes.