CausalMapSerializer

class CausalMapSerializer<K, V : DotStore<V>>(kSerializer: KSerializer<K>, vSerializer: KSerializer<V>) : KSerializer<CausalMap<K, V>>

CausalMap's serializer: the map's Causal<DotMap<K, V>> exactly as Causal's own serializer writes it, so it inherits the dot family's canonical order.

Decoding throws IllegalArgumentException for a state no CausalMap path produces: a stored dot the context has not witnessed, a dot at two positions, or a bottom store at any depth. The last check compares the decoded store with itself minus its bottoms, so it needs V's equals to be structural, as CausalMap.apply's checks do.

Constructors

Link copied to clipboard
constructor(kSerializer: KSerializer<K>, vSerializer: KSerializer<V>)

Properties

Link copied to clipboard
open override val descriptor: SerialDescriptor

Functions

Link copied to clipboard
open override fun deserialize(decoder: Decoder): CausalMap<K, V>
Link copied to clipboard
open override fun serialize(encoder: Encoder, value: CausalMap<K, V>)