KsErrorMapping

class KsErrorMapping(val code: Int, val dataType: KClass<*>, val dataSerializer: KSerializer<*>)

Describes one @KsError(code, type) binding captured by the ksrpc compiler plugin on a @KsMethod function. The plugin emits one entry per annotation in declaration order into RpcMethod.errorMappings. Runtime routing (#78) consumes these via the forwardErrorMap / reverseErrorMap helpers on RpcMethod — forward maps for client-side deserialization by incoming wire code, reverse maps for server-side resolution of a thrown data::class back to its code + serializer.

Constructors

Link copied to clipboard
constructor(code: Int, dataType: KClass<*>, dataSerializer: KSerializer<*>)

Properties

Link copied to clipboard
val code: Int
Link copied to clipboard
val dataSerializer: KSerializer<*>
Link copied to clipboard