Files

3 lines
2.4 KiB
HTML
Raw Permalink 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>StructRef (capnp-rpc.Capnp_rpc.StructRef)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.4"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../odoc.support/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">capnp-rpc</a> &#x00BB; <a href="../index.html">Capnp_rpc</a> &#x00BB; StructRef</nav><header class="odoc-preamble"><h1>Module <code><span>Capnp_rpc.StructRef</span></code></h1><p>A promise for a response structure. You can use the generated <code>_get_pipelined</code> functions on a promise to get a promise for a capability inside the promise, and then pipeline messages to that promise without waiting for the response struct to arrive.</p></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>'a t</span></span></code></div><div class="spec-doc"><p>An <code>'a t</code> is a reference to a response message (that may not have arrived yet) with content type <code>'a</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-inc_ref"><a href="#val-inc_ref" class="anchor"></a><code><span><span class="keyword">val</span> inc_ref : <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p><code>inc_ref t</code> increases the reference count on <code>t</code> by one.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-dec_ref"><a href="#val-dec_ref" class="anchor"></a><code><span><span class="keyword">val</span> dec_ref : <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p><code>dec_ref t</code> reduces the reference count on <code>t</code> by one. When the count reaches zero, this result must never be used again. If the results have not yet arrived when the count reaches zero, we send a cancellation request (which may or may not succeed). As soon as the results are available, they are released.</p></div></div></div></body></html>