mirror of
https://github.com/c-cube/tiny_httpd.git
synced 2026-01-21 16:56:40 -05:00
2 lines
3.8 KiB
HTML
2 lines
3.8 KiB
HTML
<!DOCTYPE html>
|
||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>User (ocaml.Runtime_events.User)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 2.4.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> » <a href="../index.html">Runtime_events</a> » User</nav><header class="odoc-preamble"><h1>Module <code><span>Runtime_events.User</span></code></h1><p>User events is a way for libraries to provide runtime events that can be consumed by other tools. These events can carry known data types or custom values. The current maximum number of user events is 8192.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-tag"><a href="#type-tag" class="anchor"></a><code><span><span class="keyword">type</span> tag</span><span> = </span><span>..</span></code></div><div class="spec-doc"><p>The type for a user event tag. Tags are used to discriminate between user events of the same type</p></div></div><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>'value t</span></span></code></div><div class="spec-doc"><p>The type for a user event. User events describe their tag, carried data type and an unique string-based name</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-register"><a href="#val-register" class="anchor"></a><code><span><span class="keyword">val</span> register : <span>string <span class="arrow">-></span></span> <span><a href="#type-tag">tag</a> <span class="arrow">-></span></span> <span><span><span class="type-var">'value</span> <a href="../Type/index.html#type-t">Type.t</a></span> <span class="arrow">-></span></span> <span><span class="type-var">'value</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>register name tag ty</code> registers a new event with an unique <code>name</code>, carrying a <code>tag</code> and values of type <code>ty</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-write"><a href="#val-write" class="anchor"></a><code><span><span class="keyword">val</span> write : <span><span><span class="type-var">'value</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> <span><span class="type-var">'value</span> <span class="arrow">-></span></span> unit</span></code></div><div class="spec-doc"><p><code>write t v</code> records a new event <code>t</code> with value <code>v</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-name"><a href="#val-name" class="anchor"></a><code><span><span class="keyword">val</span> name : <span><span><span class="type-var">_</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> string</span></code></div><div class="spec-doc"><p><code>name t</code> is the uniquely identifying name of event <code>t</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-tag"><a href="#val-tag" class="anchor"></a><code><span><span class="keyword">val</span> tag : <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> <a href="#type-tag">tag</a></span></code></div><div class="spec-doc"><p><code>tag t</code> is the associated tag of event <code>t</code>, when it is known. An event can be unknown if it was not registered in the consumer program.</p></div></div></div></body></html>
|