package repr

  1. Overview
  2. Docs

This module provides functions for interacting with Repr's binary serialisation format directly (without first constructing a representation of the type being encoded). These can be useful for performance-critical applications, where the runtime overhead of the dynamic specialisation is too large, or when the actual codec being used is too complex to be expressed via a type representation.

type 'a encoder = 'a -> (string -> unit) -> unit
type 'a decoder = string -> int Stdlib.ref -> 'a
type 'a sizer = 'a Size.Sizer.t
module type S = sig ... end
module type S1 = sig ... end
module type S2 = sig ... end
module type S3 = sig ... end
module type S4 = sig ... end
module Unit : S with type t := unit
module Bool : S with type t := bool
module Char : S with type t := char
module Varint : S with type t := int
module Varint_int63 : S with type t := Optint.Int63.t
module Int16 : S with type t := int
module Int32 : S with type t := int32
module Int64 : S with type t := int64
module Float : S with type t := float
module String : sig ... end
module String_unboxed : sig ... end
module Bytes : sig ... end
module Bytes_unboxed : sig ... end
module List : sig ... end
module Array : sig ... end
module Option : S1 with type 'a t := 'a option
module Pair : S2 with type ('a, 'b) t := 'a * 'b
module Triple : S3 with type ('a, 'b, 'c) t := 'a * 'b * 'c
module Quad : S4 with type ('a, 'b, 'c, 'd) t := 'a * 'b * 'c * 'd
OCaml

Innovation. Community. Security.