ocaml-containers/2.8/containers/CCHashTrie/Transient/index.html
2019-12-14 17:27:18 -06:00

2 lines
No EOL
3.3 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Transient (containers.CCHashTrie.Transient)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><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">containers</a> &#x00BB; <a href="../index.html">CCHashTrie</a> &#x00BB; Transient</nav><h1>Module <code>CCHashTrie.Transient</code></h1><h3 id="transient-identifiers"><a href="#transient-identifiers" class="anchor"></a>Transient Identifiers</h3></header><dl><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">type</span> t</code></dt><dd><p>Identifiers for transient modifications. A transient modification is uniquely identified by a <code>Transient.t</code>. Once <code>Transient.freeze r</code> is called, <code>r</code> cannot be used to modify the structure again.</p></dd></dl><dl><dt class="spec value" id="val-create"><a href="#val-create" class="anchor"></a><code><span class="keyword">val</span> create : unit <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>Create a new, active ID.</p></dd></dl><dl><dt class="spec value" id="val-equal"><a href="#val-equal" class="anchor"></a><code><span class="keyword">val</span> equal : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p>Equality between IDs.</p></dd></dl><dl><dt class="spec value" id="val-frozen"><a href="#val-frozen" class="anchor"></a><code><span class="keyword">val</span> frozen : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p><code>frozen i</code> returns <code>true</code> if <code>freeze i</code> was called before. In this case, the ID cannot be used for modifications again.</p></dd></dl><dl><dt class="spec value" id="val-active"><a href="#val-active" class="anchor"></a><code><span class="keyword">val</span> active : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p><code>active i</code> is <code>not (frozen i)</code>.</p></dd></dl><dl><dt class="spec value" id="val-freeze"><a href="#val-freeze" class="anchor"></a><code><span class="keyword">val</span> freeze : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> unit</code></dt><dd><p><code>freeze i</code> makes <code>i</code> unusable for new modifications. The values created with <code>i</code> will now be immutable.</p></dd></dl><dl><dt class="spec value" id="val-with_"><a href="#val-with_" class="anchor"></a><code><span class="keyword">val</span> with_ : (<a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <span class="type-var">'a</span>) <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dd><p><code>with_ f</code> creates a transient ID <code>i</code>, calls <code>f i</code>, freezes the ID <code>i</code> and returns the result of <code>f i</code>.</p></dd></dl><dl><dt class="spec exception" id="exception-Frozen"><a href="#exception-Frozen" class="anchor"></a><code><span class="keyword">exception</span> </code><code><span class="exception">Frozen</span></code></dt><dd><p>Raised when a frozen ID is used.</p></dd></dl></div></body></html>