package data-encoding

  1. Overview
  2. Docs

Module Data_encoding.With_versionSource

Sourcetype _ t

An encapsulation of consecutive encoding versions.

Sourceval first_version : 'a encoding -> 'a t

first_version enc records that enc is the first (known) version of the object.

Sourceval next_version : 'a encoding -> ('b -> 'a) -> 'b t -> 'a t

next_version enc upgrade prev constructs a new version from the previous version prev and an upgrade function.

Sourceval encoding : name:string -> 'a t -> 'a encoding

Make an encoding from an encapsulation of versions; the argument ~name is used to prefix the version "tag" in the encoding, it should not change from one version to the next.

OCaml

Innovation. Community. Security.