All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.com.caesarealabs.rpc4k.runtime.api.SerializationFormat.kt Maven / Gradle / Ivy

There is a newer version: 0.13.0
Show newest version
package com.caesarealabs.rpc4k.runtime.api
import com.caesarealabs.rpc4k.runtime.implementation.serializers.*
import kotlinx.serialization.DeserializationStrategy
import kotlinx.serialization.SerializationStrategy
import kotlinx.serialization.json.Json


/**
 * For example [Json] or Protobuf
 * Must use the [Rpc4kSerializersModule]
 */
public interface SerializationFormat {
    public fun  encode(serializer: SerializationStrategy, value: T): ByteArray
    public fun  decode(serializer: DeserializationStrategy, raw: ByteArray): T
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy