You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
2.8 KiB

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Serialization (infer.IBase.Serialization)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> <a href="../../index.html">infer</a> &#x00BB; <a href="../index.html">IBase</a> &#x00BB; Serialization</nav><h1>Module <code>IBase.Serialization</code></h1></header><aside><p>Serialization of data stuctures</p></aside><div class="spec module" id="module-Key"><a href="#module-Key" class="anchor"></a><code><span class="keyword">module</span> <a href="Key/index.html">Key</a> : <span class="keyword">sig</span> ... <span class="keyword">end</span></code></div><dl><dt class="spec type" id="type-serializer"><a href="#type-serializer" class="anchor"></a><code><span class="keyword">type</span> <span>'a serializer</span></code></dt><dd><p>Generic serializer</p></dd></dl><dl><dt class="spec value" id="val-create_serializer"><a href="#val-create_serializer" class="anchor"></a><code><span class="keyword">val</span> create_serializer : <a href="Key/index.html#type-t">Key.t</a> <span>&#45;&gt;</span> <span><span class="type-var">'a</span> <a href="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><dt class="spec value" id="val-read_from_file"><a href="#val-read_from_file" class="anchor"></a><code><span class="keyword">val</span> read_from_file : <span><span class="type-var">'a</span> <a href="index.html#type-serializer">serializer</a></span> <span>&#45;&gt;</span> <a href="../DB/index.html#type-filename">DB.filename</a> <span>&#45;&gt;</span> <span><span class="type-var">'a</span> option</span></code></dt><dd><p>Deserialize a file and check the keys</p></dd></dl><dl><dt class="spec value" id="val-write_to_file"><a href="#val-write_to_file" class="anchor"></a><code><span class="keyword">val</span> write_to_file : <span><span class="type-var">'a</span> <a href="index.html#type-serializer">serializer</a></span> <span>&#45;&gt;</span> <span>data:<span class="type-var">'a</span></span> <span>&#45;&gt;</span> <a href="../DB/index.html#type-filename">DB.filename</a> <span>&#45;&gt;</span> unit</code></dt><dd><p>Serialize into a file writing value</p></dd></dl><dl><dt class="spec value" id="val-generate_keys"><a href="#val-generate_keys" class="anchor"></a><code><span class="keyword">val</span> generate_keys : unit <span>&#45;&gt;</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>