class documentation

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_class Create a ServiceDefinition from a user service definition class.
Method __post_init__ Undocumented
Class Variable name Undocumented
Class Variable operation_definitions Undocumented
Static Method _collect_operations Collect operation definitions from a user service definition class.
Method _validation_errors Undocumented
@staticmethod
def from_class(user_class: type[ServiceT], name: str) -> ServiceDefinition:

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.

def __post_init__(self):

Undocumented

name: str =

Undocumented

operation_definitions: Mapping[str, OperationDefinition[Any, Any]] =

Undocumented

@staticmethod
def _collect_operations(user_class: type[ServiceT]) -> dict[str, OperationDefinition[Any, Any]]:

Collect operation definitions from a user service definition class.

Does not visit parent classes.

def _validation_errors(self) -> list[str]:

Undocumented