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.
3 lines
3.7 KiB
3 lines
3.7 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="viewport" content="width=device-width,initial-scale=1.0"/><meta name="generator" content="doc-ock-html v1.0.0-1-g1fc9bf0"/></head><body><nav id="top"><a href="../index.html">Up</a> — <span class="package">package <a href="../index.html">InferBase</a></span></nav><header><h1><span class="keyword">Module</span> <span class="module-path">InferBase__Serialization</span></h1></header><p>Serialization of data stuctures</p><div class="spec module" id="module-Key"><a href="#module-Key" class="anchor"></a><div class="def module"><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><div class="doc"></div></div><div class="spec type" id="type-serializer"><a href="#type-serializer" class="anchor"></a><div class="def type"><code><span class="keyword">type </span>'a serializer</code><code></code><code></code></div><div class="doc"><p>Generic serializer</p></div></div><div class="spec val" id="val-create_serializer"><a href="#val-create_serializer" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>create_serializer : <a href="Key/index.html#type-t">Key.t</a> <span class="keyword">‑></span> <span class="type-var">'a</span> <a href="index.html#type-serializer">serializer</a></code></div><div class="doc"><p>create a serializer from a file name
|
|
given an integer key used as double-check of the file type</p></div></div><div class="spec val" id="val-read_from_file"><a href="#val-read_from_file" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>read_from_file : <span class="type-var">'a</span> <a href="index.html#type-serializer">serializer</a> <span class="keyword">‑></span> <a href="../InferBase/DB/index.html#type-filename">InferBase.DB.filename</a> <span class="keyword">‑></span> <span class="type-var">'a</span> option</code></div><div class="doc"><p>Deserialize a file and check the keys</p></div></div><div class="spec val" id="val-read_from_string"><a href="#val-read_from_string" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>read_from_string : <span class="type-var">'a</span> <a href="index.html#type-serializer">serializer</a> <span class="keyword">‑></span> string <span class="keyword">‑></span> <span class="type-var">'a</span> option</code></div><div class="doc"><p>Deserialize a string and check the keys</p></div></div><div class="spec val" id="val-write_to_file"><a href="#val-write_to_file" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>write_to_file : <span class="type-var">'a</span> <a href="index.html#type-serializer">serializer</a> <span class="keyword">‑></span> data:<span class="type-var">'a</span> <span class="keyword">‑></span> <a href="../InferBase/DB/index.html#type-filename">InferBase.DB.filename</a> <span class="keyword">‑></span> unit</code></div><div class="doc"><p>Serialize into a file writing value</p></div></div><div class="spec val" id="val-generate_keys"><a href="#val-generate_keys" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>generate_keys : unit <span class="keyword">‑></span> int<span class="keyword"> * </span>int<span class="keyword"> * </span>int<span class="keyword"> * </span>int<span class="keyword"> * </span>int</code></div><div class="doc"><p>Generate new (random) serialization keys, to be used in an ocaml toplevel</p></div></div></body></html> |