<htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>IBase__Serialization (infer.IBase__Serialization)</title><linkrel="stylesheet"href="../../odoc.css"/><metacharset="utf-8"/><metaname="generator"content="odoc 1.5.2"/><metaname="viewport"content="width=device-width,initial-scale=1.0"/><scriptsrc="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><divclass="content"><header><nav><ahref="../index.html">Up</a>–<ahref="../index.html">infer</a>» IBase__Serialization</nav><h1>Module <code>IBase__Serialization</code></h1></header><aside><p>Serialization of data stuctures</p></aside><divclass="spec module"id="module-Key"><ahref="#module-Key"class="anchor"></a><code><spanclass="keyword">module</span><ahref="Key/index.html">Key</a> : <spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></div><dl><dtclass="spec type"id="type-serializer"><ahref="#type-serializer"class="anchor"></a><code><spanclass="keyword">type</span><span>'a serializer</span></code></dt><dd><p>Generic serializer</p></dd></dl><dl><dtclass="spec value"id="val-create_serializer"><ahref="#val-create_serializer"class="anchor"></a><code><spanclass="keyword">val</span> create_serializer : <ahref="Key/index.html#type-t">Key.t</a><span>-></span><span><spanclass="type-var">'a</span><ahref="index.html#type-serializer">serializer</a></span></code></dt><dd><p>create a serializer from a file name given an integer key used as double-check of the file type</p></dd></dl><dl><dtclass="spec value"id="val-read_from_file"><ahref="#val-read_from_file"class="anchor"></a><code><spanclass="keyword">val</span> read_from_file : <span><spanclass="type-var">'a</span><ahref="index.html#type-serializer">serializer</a></span><span>-></span><ahref="../IBase/DB/index.html#type-filename">IBase.DB.filename</a><span>-></span><span><spanclass="type-var">'a</span> option</span></code></dt><dd><p>Deserialize a file and check the keys</p></dd></dl><dl><dtclass="spec value"id="val-write_to_file"><ahref="#val-write_to_file"class="anchor"></a><code><spanclass="keyword">val</span> write_to_file : <span><spanclass="type-var">'a</span><ahref="index.html#type-serializer">serializer</a></span><span>-></span><span>data:<spanclass="type-var">'a</span></span><span>-></span><ahref="../IBase/DB/index.html#type-filename">IBase.DB.filename</a><span>-></span> unit</code></dt><dd><p>Serialize into a file writing value</p></dd></dl><dl><dtclass="spec value"id="val-generate_keys"><ahref="#val-generate_keys"class="anchor"></a><code><spanclass="keyword">val</span> generate_keys : unit <span>-></span> int * int * int</code></dt><dd><p>Generate new (random) serialization keys, to be used in an ocaml toplevel</p></dd></dl></div></body></html>