mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
2 lines
No EOL
3.6 KiB
HTML
2 lines
No EOL
3.6 KiB
HTML
<!DOCTYPE html>
|
||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>CCRingBuffer (containers.CCRingBuffer)</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> » CCRingBuffer</nav><h1>Module <code>CCRingBuffer</code></h1><h2 id="circular-buffer-(deque)"><a href="#circular-buffer-(deque)" class="anchor"></a>Circular Buffer (Deque)</h2><p>Useful for IO, or as a bounded-size alternative to <code>Queue</code> when batch operations are needed.</p><p><b>status: experimental</b></p><p>Change in the API to provide only a bounded buffer since 1.3</p><dl><dt>since</dt><dd>0.9</dd></dl><nav class="toc"><ul><li><a href="#underlying-array">Underlying Array</a></li></ul></nav></header><section><header><h2 id="underlying-array"><a href="#underlying-array" class="anchor"></a>Underlying Array</h2></header><dl><dt class="spec module" id="module-Array"><a href="#module-Array" class="anchor"></a><code><span class="keyword">module </span><a href="Array/index.html">Array</a> : <span class="keyword">sig</span> ... <span class="keyword">end</span></code></dt><dd><p>The abstract type for arrays</p></dd></dl><dl><dt class="spec module-type" id="module-type-S"><a href="#module-type-S" class="anchor"></a><code><span class="keyword">module type </span><a href="module-type-S/index.html">S</a> = <span class="keyword">sig</span> ... <span class="keyword">end</span></code></dt><dd></dd></dl><dl><dt class="spec module" id="module-Byte"><a href="#module-Byte" class="anchor"></a><code><span class="keyword">module </span><a href="Byte/index.html">Byte</a> : <a href="index.html#module-type-S">S</a><span class="keyword"> with </span><span class="keyword">module </span><a href="module-type-S/Array/index.html">Array</a> = <a href="Array/index.html#module-Byte">Array.Byte</a></code></dt><dd><p>An efficient byte based ring buffer</p></dd></dl><dl><dt class="spec module" id="module-MakeFromArray"><a href="#module-MakeFromArray" class="anchor"></a><code><span class="keyword">module </span><a href="MakeFromArray/index.html">MakeFromArray</a> : <span class="keyword">functor</span> (<a href="MakeFromArray/argument-1-A/index.html">A</a> : <a href="Array/index.html#module-type-S">Array.S</a>) <span>-></span> <a href="index.html#module-type-S">S</a><span class="keyword"> with </span><span class="keyword">module </span><a href="MakeFromArray/Array/index.html">Array</a> = <a href="MakeFromArray/index.html#argument-1-A">A</a></code></dt><dd><p>Makes a ring buffer module with the given array type</p></dd></dl><dl><dt class="spec module" id="module-Make"><a href="#module-Make" class="anchor"></a><code><span class="keyword">module </span><a href="Make/index.html">Make</a> : <span class="keyword">functor</span> (<a href="Make/argument-1-X/index.html">X</a> : <span class="keyword">sig</span> ... <span class="keyword">end</span>) <span>-></span> <a href="index.html#module-type-S">S</a><span class="keyword"> with </span><span class="keyword">type </span><a href="Make/Array/index.html#type-elt">Array.elt</a><span class="keyword"> = </span><a href="Make/argument-1-X/index.html#type-t">X.t</a><span class="keyword"> and </span><span class="keyword">type </span><a href="Make/Array/index.html#type-t">Array.t</a><span class="keyword"> = </span><a href="Make/argument-1-X/index.html#type-t">X.t</a> array</code></dt><dd><p>Buffer using regular arrays</p></dd></dl></section></div></body></html> |