RpcObjectFactory

Supertype of the generated companion for generic @KsService interfaces. Lets callers materialize an RpcObject for a concrete instantiation of the service when they only have KTypes (for example, reflective/introspection code or sub-service transformers).

Non-generic service companions directly implement RpcObject and do not need this factory indirection — they are already an RpcObject<Service>.

The preferred, type-safe entry point remains the companion's operator fun <T, ...> invoke(serializer, ...): RpcObject<Service<T, ...>>; this factory exists for contexts where a KSerializer isn't statically available.

Properties

Link copied to clipboard
abstract val arity: Int

Number of type parameters the service declares.

Functions

Link copied to clipboard
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.