VersionedCodec

class VersionedCodec<T : @Serializable Any>(file: Path, version: Int = 0, json: Json, serializer: KSerializer<T>, migration: Migration<T>, versionPath: Path = Path("$file.version")) : Codec<T>

Constructors

Link copied to clipboard
constructor(file: Path, version: Int = 0, json: Json, serializer: KSerializer<T>, migration: Migration<T>, versionPath: Path = Path("$file.version"))

Functions

Link copied to clipboard
open suspend override fun decode(): T?
Link copied to clipboard
open suspend override fun encode(value: T?)