moonpool/dev/ocaml/Stdlib/Ephemeron/K1/Bucket/index.html

2 lines
No EOL
4.2 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>Bucket (ocaml.Stdlib.Ephemeron.K1.Bucket)</title><link rel="stylesheet" href="../../../../../_odoc-theme/odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.2.1"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> <a href="../../../../index.html">ocaml</a> &#x00BB; <a href="../../../index.html">Stdlib</a> &#x00BB; <a href="../../index.html">Ephemeron</a> &#x00BB; <a href="../index.html">K1</a> &#x00BB; Bucket</nav><header class="odoc-preamble"><h1>Module <code><span>K1.Bucket</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> <span>('k, 'd) t</span></span></code></div><div class="spec-doc"><p>A bucket is a mutable &quot;list&quot; of ephemerons.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-make"><a href="#val-make" class="anchor"></a><code><span><span class="keyword">val</span> make : <span>unit <span class="arrow">&#45;&gt;</span></span> <span><span>(<span class="type-var">'k</span>, <span class="type-var">'d</span>)</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p>Create a new bucket.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-add"><a href="#val-add" class="anchor"></a><code><span><span class="keyword">val</span> add : <span><span><span>(<span class="type-var">'k</span>, <span class="type-var">'d</span>)</span> <a href="#type-t">t</a></span> <span class="arrow">&#45;&gt;</span></span> <span><span class="type-var">'k</span> <span class="arrow">&#45;&gt;</span></span> <span><span class="type-var">'d</span> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p>Add an ephemeron to the bucket.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-remove"><a href="#val-remove" class="anchor"></a><code><span><span class="keyword">val</span> remove : <span><span><span>(<span class="type-var">'k</span>, <span class="type-var">'d</span>)</span> <a href="#type-t">t</a></span> <span class="arrow">&#45;&gt;</span></span> <span><span class="type-var">'k</span> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p><code>remove b k</code> removes from <code>b</code> the most-recently added ephemeron with key <code>k</code>, or does nothing if there is no such ephemeron.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-find"><a href="#val-find" class="anchor"></a><code><span><span class="keyword">val</span> find : <span><span><span>(<span class="type-var">'k</span>, <span class="type-var">'d</span>)</span> <a href="#type-t">t</a></span> <span class="arrow">&#45;&gt;</span></span> <span><span class="type-var">'k</span> <span class="arrow">&#45;&gt;</span></span> <span><span class="type-var">'d</span> option</span></span></code></div><div class="spec-doc"><p>Returns the data of the most-recently added ephemeron with the given key, or <code>None</code> if there is no such ephemeron.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-length"><a href="#val-length" class="anchor"></a><code><span><span class="keyword">val</span> length : <span><span><span>(<span class="type-var">'k</span>, <span class="type-var">'d</span>)</span> <a href="#type-t">t</a></span> <span class="arrow">&#45;&gt;</span></span> int</span></code></div><div class="spec-doc"><p>Returns an upper bound on the length of the bucket.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-clear"><a href="#val-clear" class="anchor"></a><code><span><span class="keyword">val</span> clear : <span><span><span>(<span class="type-var">'k</span>, <span class="type-var">'d</span>)</span> <a href="#type-t">t</a></span> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p>Remove all ephemerons from the bucket.</p></div></div></div></body></html>