package conex

  1. Overview
  2. Docs

Common header on disk

type t = {
  1. version : Conex_utils.Uint.t;
  2. created : Conex_utils.Uint.t;
  3. counter : Conex_utils.Uint.t;
  4. wraps : Conex_utils.Uint.t;
  5. name : name;
  6. typ : typ;
}

The header consists of version, created, counter, wraps, a name, and a typ.

pp is a pretty printer.

val wire : t -> Wire.t

wire t is the wire representation of t.

val of_wire : Wire.t -> (t, string) result

of_wire t converts t into a Header.t or error.

val timestamp : Conex_utils.Uint.t -> string

timestamp uint prints uint to a string as a timestamp (decimal as seconds since UNIX epoch).

val counter : Conex_utils.Uint.t -> Conex_utils.Uint.t -> string

counter ctr wrap prints ctr, wrap to a string containing the counter and wraps (unless zero).