wireSerializer
Returns a kotlinx.serialization.KSerializer for Rga<V> that correctly threads vSerializer through the op-log serialization, avoiding the CBOR polymorphism limitation of the compiler-generated Rga$$serializer.
Use this instead of Rga.serializer(...) when wiring Rga into a us.tractat.kuilt.quilter.Quilter — the generated serializer fails for CBOR transport because it defaults to PolymorphicSerializer(Any::class) for the element type V in RgaOp.Insert.value.
Usage:
val msgSer = QuiltMessage.serializer(Rga.wireSerializer(serializer<String>()))
val replicator = Quilter(..., messageSerializer = msgSer)Content copied to clipboard
Parameters
vSerializer
the kotlinx.serialization.KSerializer for element type V.