create

abstract fun create(typeArgs: List<KType>): RpcObject<T>

Create an RpcObject for a concrete instantiation of the service, resolving the needed serializers from typeArgs via kotlinx.serialization.serializer.

Parameters

typeArgs

KTypes for each type parameter, in declaration order.

Throws

if typeArgs.size does not match arity, or if any type argument is not @Serializable / not resolvable by kotlinx.serialization.