rpcObject

expect inline fun <T : RpcService> rpcObject(): RpcObject<T>

Helper to get RpcObject for a given RpcService

actual inline fun <T : RpcService> rpcObject(): RpcObject<T>
actual inline fun <T : RpcService> rpcObject(): RpcObject<T>

Resolve the RpcObject for T.

Resolution order:

  1. If T::class has a companion that is an RpcObject, return it directly.

  2. If T::class has a companion that is an RpcObjectFactory, use the type arguments from typeOf<T>() to build the concrete RpcObject.

  3. Otherwise walk the supertypes of T (preserving type arguments) and return the first supertype whose classifier's companion is an RpcObject or an RpcObjectFactory. For a factory, the type arguments used are taken from THAT supertype's kotlin.reflect.KType (so e.g. interface TypedStream : KsStream<Info> correctly supplies <Info> to the parent's factory even though TypedStream itself has no type parameters).

actual inline fun <T : RpcService> rpcObject(): RpcObject<T>
actual inline fun <T : RpcService> rpcObject(): RpcObject<T>