Core.BinableSourcetype bigstring =
(Base.Char.t, Bigarray.int8_unsigned_elt, Bigarray.c_layout)
Bigarray.Array1.tWe copy the definition of the bigstring type here, because we cannot depend on bigstring.ml
New code should use @@deriving bin_io. These module types (S, S1, and S2) are exported only for backwards compatibility.
Of_binable* functors are for when you want the binary representation of one type to be the same as that for some other isomorphic type.
module Of_binable1_without_uuid
(Binable : Minimal.S1)
(M : Conv1_without_uuid with type 'a binable := 'a Binable.t) :
S1 with type 'a t := 'a M.tmodule Of_binable2_without_uuid
(Binable : Minimal.S2)
(M : Conv2_without_uuid with type ('a, 'b) binable := ('a, 'b) Binable.t) :
S2 with type ('a, 'b) t := ('a, 'b) M.tmodule Of_binable3_without_uuid
(Binable : Minimal.S3)
(M :
Conv3_without_uuid with type ('a, 'b, 'c) binable := ('a, 'b, 'c) Binable.t) :
S3 with type ('a, 'b, 'c) t := ('a, 'b, 'c) M.tOf_sexpable_with_uuid serializes a value using the bin-io of the sexp serialization of the value. This is not as efficient as using @@deriving bin_io. However, it is useful when performance isn't important and there are obstacles to using @@deriving bin_io, e.g., some type missing @@deriving bin_io. Of_sexpable_with_uuid is also useful when one wants to be forgiving about format changes, due to the sexp serialization being more robust to changes like adding or removing a constructor.
The following functors preserve stability: if applied to stable types with stable (de)serializations, they will produce stable types with stable (de)serializations.
Note: In all cases, stability of the input (and therefore the output) depends on the semantics of all conversion functions (e.g. to_string, to_sexpable) not changing in the future.