nexusrpc.ServiceDefinition

@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):

@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]: