Module InferBase__Serialization

Serialization of data stuctures

module Key : sig ... end
type 'a serializer

Generic serializer

val create_serializer : Key.t ‑> 'a serializer

create a serializer from a file name given an integer key used as double-check of the file type

val read_from_file : 'a serializer ‑> InferBase.DB.filename ‑> 'a option

Deserialize a file and check the keys

val read_from_string : 'a serializer ‑> string ‑> 'a option

Deserialize a string and check the keys

val write_to_file : 'a serializer ‑> data:'a ‑> InferBase.DB.filename ‑> unit

Serialize into a file writing value

val generate_keys : unit ‑> int * int * int * int * int

Generate new (random) serialization keys, to be used in an ocaml toplevel