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
3.3 KiB

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>InferBase__Serialization (InferBase.InferBase__Serialization)</title><link rel="stylesheet" href="../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc %%VERSION%%"/><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">InferBase</a> &#x00BB; InferBase__Serialization</nav><h1>Module <code>InferBase__Serialization</code></h1><p>Serialization of data stuctures</p></header><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="../InferBase/DB/index.html#type-filename">InferBase.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-read_from_string"><a href="#val-read_from_string" class="anchor"></a><code><span class="keyword">val</span> read_from_string : <span><span class="type-var">'a</span> <a href="index.html#type-serializer">serializer</a></span> <span>&#45;&gt;</span> string <span>&#45;&gt;</span> <span><span class="type-var">'a</span> option</span></code></dt><dd><p>Deserialize a string 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="../InferBase/DB/index.html#type-filename">InferBase.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 * int * int</code></dt><dd><p>Generate new (random) serialization keys, to be used in an ocaml toplevel</p></dd></dl></div></body></html>