deploy: affb84545de335b037252075b83357a7fd8c3ca3

This commit is contained in:
divagant-martian
2026-01-09 21:49:32 +00:00
parent cb1ae81203
commit e1f2cfad53
19 changed files with 7676 additions and 7733 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -33,7 +33,7 @@ increasing time. Specifically, calling <a href="struct.Connection.html#method.ha
with events of the same <a href="https://doc.rust-lang.org/nightly/std/time/struct.Instant.html" title="struct std::time::Instant"><code>Instant</code></a> may be interleaved in any order with a
call to <a href="struct.Connection.html#method.handle_event" title="method iroh_quinn_proto::Connection::handle_event"><code>handle_event</code></a> at that same instant; however
events or timeouts with different instants must not be interleaved.</p>
</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Connection" class="impl"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#317-6334">Source</a><a href="#impl-Connection" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.Connection.html" title="struct iroh_quinn_proto::Connection">Connection</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.poll_timeout" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#478-480">Source</a><h4 class="code-header">pub fn <a href="#method.poll_timeout" class="fn">poll_timeout</a>(&amp;mut self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/std/time/struct.Instant.html" title="struct std::time::Instant">Instant</a>&gt;</h4></section></summary><div class="docblock"><p>Returns the next time at which <code>handle_timeout</code> should be called</p>
</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Connection" class="impl"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#317-6320">Source</a><a href="#impl-Connection" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.Connection.html" title="struct iroh_quinn_proto::Connection">Connection</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.poll_timeout" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#478-480">Source</a><h4 class="code-header">pub fn <a href="#method.poll_timeout" class="fn">poll_timeout</a>(&amp;mut self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/std/time/struct.Instant.html" title="struct std::time::Instant">Instant</a>&gt;</h4></section></summary><div class="docblock"><p>Returns the next time at which <code>handle_timeout</code> should be called</p>
<p>The value returned may change after:</p>
<ul>
<li>the application performed some I/O on the connection</li>
@@ -107,7 +107,7 @@ for a path that was never opened locally.</p>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/core/time/struct.Duration.html" title="struct core::time::Duration">Duration</a>&gt;, <a class="struct" href="struct.ClosedPath.html" title="struct iroh_quinn_proto::ClosedPath">ClosedPath</a>&gt;</h4></section></summary><div class="docblock"><p>Sets the keep_alive_interval for a specific path</p>
<p>See <a href="struct.TransportConfig.html#method.default_path_keep_alive_interval" title="method iroh_quinn_proto::TransportConfig::default_path_keep_alive_interval"><code>TransportConfig::default_path_keep_alive_interval</code></a> for details.</p>
<p>Returns the previous value of the setting.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.poll_transmit" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#916-1572">Source</a><h4 class="code-header">pub fn <a href="#method.poll_transmit" class="fn">poll_transmit</a>(
</div></details><details class="toggle method-toggle" open><summary><section id="method.poll_transmit" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#916-1567">Source</a><h4 class="code-header">pub fn <a href="#method.poll_transmit" class="fn">poll_transmit</a>(
&amp;mut self,
now: <a class="struct" href="https://doc.rust-lang.org/nightly/std/time/struct.Instant.html" title="struct std::time::Instant">Instant</a>,
max_datagrams: <a class="type" href="https://doc.rust-lang.org/nightly/core/num/nonzero/type.NonZeroUsize.html" title="type core::num::nonzero::NonZeroUsize">NonZeroUsize</a>,
@@ -121,60 +121,60 @@ for a path that was never opened locally.</p>
</ul>
<p><code>max_datagrams</code> specifies how many datagrams can be returned inside a
single Transmit using GSO. This must be at least 1.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.handle_event" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#1757-1828">Source</a><h4 class="code-header">pub fn <a href="#method.handle_event" class="fn">handle_event</a>(&amp;mut self, event: <a class="struct" href="struct.ConnectionEvent.html" title="struct iroh_quinn_proto::ConnectionEvent">ConnectionEvent</a>)</h4></section></summary><div class="docblock"><p>Process <code>ConnectionEvent</code>s generated by the associated <code>Endpoint</code></p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.handle_event" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#1752-1823">Source</a><h4 class="code-header">pub fn <a href="#method.handle_event" class="fn">handle_event</a>(&amp;mut self, event: <a class="struct" href="struct.ConnectionEvent.html" title="struct iroh_quinn_proto::ConnectionEvent">ConnectionEvent</a>)</h4></section></summary><div class="docblock"><p>Process <code>ConnectionEvent</code>s generated by the associated <code>Endpoint</code></p>
<p>Will execute protocol logic upon receipt of a connection event, in turn preparing signals
(including application <code>Event</code>s, <code>EndpointEvent</code>s and outgoing datagrams) that should be
extracted through the relevant methods.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.handle_timeout" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#1902-2048">Source</a><h4 class="code-header">pub fn <a href="#method.handle_timeout" class="fn">handle_timeout</a>(&amp;mut self, now: <a class="struct" href="https://doc.rust-lang.org/nightly/std/time/struct.Instant.html" title="struct std::time::Instant">Instant</a>)</h4></section></summary><div class="docblock"><p>Process timer expirations</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.handle_timeout" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#1897-2043">Source</a><h4 class="code-header">pub fn <a href="#method.handle_timeout" class="fn">handle_timeout</a>(&amp;mut self, now: <a class="struct" href="https://doc.rust-lang.org/nightly/std/time/struct.Instant.html" title="struct std::time::Instant">Instant</a>)</h4></section></summary><div class="docblock"><p>Process timer expirations</p>
<p>Executes protocol logic, potentially preparing signals (including application <code>Event</code>s,
<code>EndpointEvent</code>s and outgoing datagrams) that should be extracted through the relevant
methods.</p>
<p>It is most efficient to call this immediately after the system clock reaches the latest
<code>Instant</code> that was output by <code>poll_timeout</code>; however spurious extra calls will simply
no-op and therefore are safe.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.close" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2061-2066">Source</a><h4 class="code-header">pub fn <a href="#method.close" class="fn">close</a>(&amp;mut self, now: <a class="struct" href="https://doc.rust-lang.org/nightly/std/time/struct.Instant.html" title="struct std::time::Instant">Instant</a>, error_code: <a class="struct" href="struct.VarInt.html" title="struct iroh_quinn_proto::VarInt">VarInt</a>, reason: Bytes)</h4></section></summary><div class="docblock"><p>Close a connection immediately</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.close" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2056-2061">Source</a><h4 class="code-header">pub fn <a href="#method.close" class="fn">close</a>(&amp;mut self, now: <a class="struct" href="https://doc.rust-lang.org/nightly/std/time/struct.Instant.html" title="struct std::time::Instant">Instant</a>, error_code: <a class="struct" href="struct.VarInt.html" title="struct iroh_quinn_proto::VarInt">VarInt</a>, reason: Bytes)</h4></section></summary><div class="docblock"><p>Close a connection immediately</p>
<p>This does not ensure delivery of outstanding data. It is the application’s responsibility to
call this only when all important communications have been completed, e.g. by calling
<a href="struct.SendStream.html#method.finish" title="method iroh_quinn_proto::SendStream::finish"><code>SendStream::finish</code></a> on outstanding streams and waiting for the corresponding
<a href="enum.StreamEvent.html#variant.Finished" title="variant iroh_quinn_proto::StreamEvent::Finished"><code>StreamEvent::Finished</code></a> event.</p>
<p>If <a href="struct.Streams.html#method.send_streams" title="method iroh_quinn_proto::Streams::send_streams"><code>Streams::send_streams</code></a> returns 0, all outstanding stream data has been
delivered. There may still be data from the peer that has not been received.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.datagrams" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2079-2081">Source</a><h4 class="code-header">pub fn <a href="#method.datagrams" class="fn">datagrams</a>(&amp;mut self) -&gt; <a class="struct" href="struct.Datagrams.html" title="struct iroh_quinn_proto::Datagrams">Datagrams</a>&lt;'_&gt;</h4></section></summary><div class="docblock"><p>Control datagrams</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.stats" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2084-2086">Source</a><h4 class="code-header">pub fn <a href="#method.stats" class="fn">stats</a>(&amp;mut self) -&gt; <a class="struct" href="struct.ConnectionStats.html" title="struct iroh_quinn_proto::ConnectionStats">ConnectionStats</a></h4></section></summary><div class="docblock"><p>Returns connection statistics</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.path_stats" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2089-2096">Source</a><h4 class="code-header">pub fn <a href="#method.path_stats" class="fn">path_stats</a>(&amp;mut self, path_id: <a class="struct" href="struct.PathId.html" title="struct iroh_quinn_proto::PathId">PathId</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="struct.PathStats.html" title="struct iroh_quinn_proto::PathStats">PathStats</a>&gt;</h4></section></summary><div class="docblock"><p>Returns path statistics</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.ping" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2101-2107">Source</a><h4 class="code-header">pub fn <a href="#method.ping" class="fn">ping</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Ping the remote endpoint</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.datagrams" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2074-2076">Source</a><h4 class="code-header">pub fn <a href="#method.datagrams" class="fn">datagrams</a>(&amp;mut self) -&gt; <a class="struct" href="struct.Datagrams.html" title="struct iroh_quinn_proto::Datagrams">Datagrams</a>&lt;'_&gt;</h4></section></summary><div class="docblock"><p>Control datagrams</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.stats" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2079-2081">Source</a><h4 class="code-header">pub fn <a href="#method.stats" class="fn">stats</a>(&amp;mut self) -&gt; <a class="struct" href="struct.ConnectionStats.html" title="struct iroh_quinn_proto::ConnectionStats">ConnectionStats</a></h4></section></summary><div class="docblock"><p>Returns connection statistics</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.path_stats" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2084-2091">Source</a><h4 class="code-header">pub fn <a href="#method.path_stats" class="fn">path_stats</a>(&amp;mut self, path_id: <a class="struct" href="struct.PathId.html" title="struct iroh_quinn_proto::PathId">PathId</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="struct.PathStats.html" title="struct iroh_quinn_proto::PathStats">PathStats</a>&gt;</h4></section></summary><div class="docblock"><p>Returns path statistics</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.ping" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2096-2102">Source</a><h4 class="code-header">pub fn <a href="#method.ping" class="fn">ping</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Ping the remote endpoint</p>
<p>Causes an ACK-eliciting packet to be transmitted on the connection.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.ping_path" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2112-2119">Source</a><h4 class="code-header">pub fn <a href="#method.ping_path" class="fn">ping_path</a>(&amp;mut self, path: <a class="struct" href="struct.PathId.html" title="struct iroh_quinn_proto::PathId">PathId</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="struct.ClosedPath.html" title="struct iroh_quinn_proto::ClosedPath">ClosedPath</a>&gt;</h4></section></summary><div class="docblock"><p>Ping the remote endpoint over a specific path</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.ping_path" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2107-2114">Source</a><h4 class="code-header">pub fn <a href="#method.ping_path" class="fn">ping_path</a>(&amp;mut self, path: <a class="struct" href="struct.PathId.html" title="struct iroh_quinn_proto::PathId">PathId</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="struct.ClosedPath.html" title="struct iroh_quinn_proto::ClosedPath">ClosedPath</a>&gt;</h4></section></summary><div class="docblock"><p>Ping the remote endpoint over a specific path</p>
<p>Causes an ACK-eliciting packet to be transmitted on the path.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.force_key_update" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2124-2136">Source</a><h4 class="code-header">pub fn <a href="#method.force_key_update" class="fn">force_key_update</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Update traffic keys spontaneously</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.force_key_update" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2119-2131">Source</a><h4 class="code-header">pub fn <a href="#method.force_key_update" class="fn">force_key_update</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Update traffic keys spontaneously</p>
<p>This can be useful for testing key updates, as they otherwise only happen infrequently.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.crypto_session" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2146-2148">Source</a><h4 class="code-header">pub fn <a href="#method.crypto_session" class="fn">crypto_session</a>(&amp;self) -&gt; &amp;dyn <a class="trait" href="crypto/trait.Session.html" title="trait iroh_quinn_proto::crypto::Session">Session</a></h4></section></summary><div class="docblock"><p>Get a session reference</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_handshaking" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2154-2156">Source</a><h4 class="code-header">pub fn <a href="#method.is_handshaking" class="fn">is_handshaking</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Whether the connection is in the process of being established</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.crypto_session" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2141-2143">Source</a><h4 class="code-header">pub fn <a href="#method.crypto_session" class="fn">crypto_session</a>(&amp;self) -&gt; &amp;dyn <a class="trait" href="crypto/trait.Session.html" title="trait iroh_quinn_proto::crypto::Session">Session</a></h4></section></summary><div class="docblock"><p>Get a session reference</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_handshaking" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2149-2151">Source</a><h4 class="code-header">pub fn <a href="#method.is_handshaking" class="fn">is_handshaking</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Whether the connection is in the process of being established</p>
<p>If this returns <code>false</code>, the connection may be either established or closed, signaled by the
emission of a <code>Connected</code> or <code>ConnectionLost</code> message respectively.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_closed" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2165-2167">Source</a><h4 class="code-header">pub fn <a href="#method.is_closed" class="fn">is_closed</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Whether the connection is closed</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_closed" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2160-2162">Source</a><h4 class="code-header">pub fn <a href="#method.is_closed" class="fn">is_closed</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Whether the connection is closed</p>
<p>Closed connections cannot transport any further data. A connection becomes closed when
either peer application intentionally closes it, or when either transport layer detects an
error such as a time-out or certificate validation failure.</p>
<p>A <code>ConnectionLost</code> event is emitted with details when the connection becomes closed.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_drained" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2173-2175">Source</a><h4 class="code-header">pub fn <a href="#method.is_drained" class="fn">is_drained</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Whether there is no longer any need to keep the connection around</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_drained" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2168-2170">Source</a><h4 class="code-header">pub fn <a href="#method.is_drained" class="fn">is_drained</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Whether there is no longer any need to keep the connection around</p>
<p>Closed connections become drained after a brief timeout to absorb any remaining in-flight
packets from the peer. All drained connections have been closed.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.accepted_0rtt" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2180-2182">Source</a><h4 class="code-header">pub fn <a href="#method.accepted_0rtt" class="fn">accepted_0rtt</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>For clients, if the peer accepted the 0-RTT data packets</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.accepted_0rtt" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2175-2177">Source</a><h4 class="code-header">pub fn <a href="#method.accepted_0rtt" class="fn">accepted_0rtt</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>For clients, if the peer accepted the 0-RTT data packets</p>
<p>The value is meaningless until after the handshake completes.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.has_0rtt" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2185-2187">Source</a><h4 class="code-header">pub fn <a href="#method.has_0rtt" class="fn">has_0rtt</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Whether 0-RTT is/was possible during the handshake</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.has_pending_retransmits" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2190-2192">Source</a><h4 class="code-header">pub fn <a href="#method.has_pending_retransmits" class="fn">has_pending_retransmits</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Whether there are any pending retransmits</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.side" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2195-2197">Source</a><h4 class="code-header">pub fn <a href="#method.side" class="fn">side</a>(&amp;self) -&gt; <a class="enum" href="enum.Side.html" title="enum iroh_quinn_proto::Side">Side</a></h4></section></summary><div class="docblock"><p>Look up whether we’re the client or server of this Connection</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.path_observed_address" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2200-2209">Source</a><h4 class="code-header">pub fn <a href="#method.path_observed_address" class="fn">path_observed_address</a>(
</div></details><details class="toggle method-toggle" open><summary><section id="method.has_0rtt" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2180-2182">Source</a><h4 class="code-header">pub fn <a href="#method.has_0rtt" class="fn">has_0rtt</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Whether 0-RTT is/was possible during the handshake</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.has_pending_retransmits" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2185-2187">Source</a><h4 class="code-header">pub fn <a href="#method.has_pending_retransmits" class="fn">has_pending_retransmits</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Whether there are any pending retransmits</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.side" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2190-2192">Source</a><h4 class="code-header">pub fn <a href="#method.side" class="fn">side</a>(&amp;self) -&gt; <a class="enum" href="enum.Side.html" title="enum iroh_quinn_proto::Side">Side</a></h4></section></summary><div class="docblock"><p>Look up whether we’re the client or server of this Connection</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.path_observed_address" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2195-2204">Source</a><h4 class="code-header">pub fn <a href="#method.path_observed_address" class="fn">path_observed_address</a>(
&amp;self,
path_id: <a class="struct" href="struct.PathId.html" title="struct iroh_quinn_proto::PathId">PathId</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/net/socket_addr/enum.SocketAddr.html" title="enum core::net::socket_addr::SocketAddr">SocketAddr</a>&gt;, <a class="struct" href="struct.ClosedPath.html" title="struct iroh_quinn_proto::ClosedPath">ClosedPath</a>&gt;</h4></section></summary><div class="docblock"><p>Get the address observed by the remote over the given path</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.rtt" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2212-2214">Source</a><h4 class="code-header">pub fn <a href="#method.rtt" class="fn">rtt</a>(&amp;self, path_id: <a class="struct" href="struct.PathId.html" title="struct iroh_quinn_proto::PathId">PathId</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/core/time/struct.Duration.html" title="struct core::time::Duration">Duration</a>&gt;</h4></section></summary><div class="docblock"><p>Current best estimate of this connection’s latency (round-trip-time)</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.congestion_state" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2217-2219">Source</a><h4 class="code-header">pub fn <a href="#method.congestion_state" class="fn">congestion_state</a>(&amp;self, path_id: <a class="struct" href="struct.PathId.html" title="struct iroh_quinn_proto::PathId">PathId</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;dyn <a class="trait" href="congestion/trait.Controller.html" title="trait iroh_quinn_proto::congestion::Controller">Controller</a>&gt;</h4></section></summary><div class="docblock"><p>Current state of this connection’s congestion controller, for debugging purposes</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_max_concurrent_streams" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2225-2231">Source</a><h4 class="code-header">pub fn <a href="#method.set_max_concurrent_streams" class="fn">set_max_concurrent_streams</a>(&amp;mut self, dir: <a class="enum" href="enum.Dir.html" title="enum iroh_quinn_proto::Dir">Dir</a>, count: <a class="struct" href="struct.VarInt.html" title="struct iroh_quinn_proto::VarInt">VarInt</a>)</h4></section></summary><div class="docblock"><p>Modify the number of remotely initiated streams that may be concurrently open</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.rtt" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2207-2209">Source</a><h4 class="code-header">pub fn <a href="#method.rtt" class="fn">rtt</a>(&amp;self, path_id: <a class="struct" href="struct.PathId.html" title="struct iroh_quinn_proto::PathId">PathId</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/core/time/struct.Duration.html" title="struct core::time::Duration">Duration</a>&gt;</h4></section></summary><div class="docblock"><p>Current best estimate of this connection’s latency (round-trip-time)</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.congestion_state" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2212-2214">Source</a><h4 class="code-header">pub fn <a href="#method.congestion_state" class="fn">congestion_state</a>(&amp;self, path_id: <a class="struct" href="struct.PathId.html" title="struct iroh_quinn_proto::PathId">PathId</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;dyn <a class="trait" href="congestion/trait.Controller.html" title="trait iroh_quinn_proto::congestion::Controller">Controller</a>&gt;</h4></section></summary><div class="docblock"><p>Current state of this connection’s congestion controller, for debugging purposes</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_max_concurrent_streams" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2220-2226">Source</a><h4 class="code-header">pub fn <a href="#method.set_max_concurrent_streams" class="fn">set_max_concurrent_streams</a>(&amp;mut self, dir: <a class="enum" href="enum.Dir.html" title="enum iroh_quinn_proto::Dir">Dir</a>, count: <a class="struct" href="struct.VarInt.html" title="struct iroh_quinn_proto::VarInt">VarInt</a>)</h4></section></summary><div class="docblock"><p>Modify the number of remotely initiated streams that may be concurrently open</p>
<p>No streams may be opened by the peer unless fewer than <code>count</code> are already open. Large
<code>count</code>s increase both minimum and worst-case memory consumption.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_max_concurrent_paths" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2242-2263">Source</a><h4 class="code-header">pub fn <a href="#method.set_max_concurrent_paths" class="fn">set_max_concurrent_paths</a>(
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_max_concurrent_paths" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2237-2258">Source</a><h4 class="code-header">pub fn <a href="#method.set_max_concurrent_paths" class="fn">set_max_concurrent_paths</a>(
&amp;mut self,
now: <a class="struct" href="https://doc.rust-lang.org/nightly/std/time/struct.Instant.html" title="struct std::time::Instant">Instant</a>,
count: <a class="type" href="https://doc.rust-lang.org/nightly/core/num/nonzero/type.NonZeroU32.html" title="type core::num::nonzero::NonZeroU32">NonZeroU32</a>,
@@ -185,36 +185,36 @@ actively reduce paths they must be closed using <a href="struct.Connection.html#
can also be used to close not-yet-opened paths.</p>
<p>If multipath is not negotiated (see the <a href="struct.TransportConfig.html" title="struct iroh_quinn_proto::TransportConfig"><code>TransportConfig</code></a>) this can not enable
multipath and will fail.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.max_concurrent_streams" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2282-2284">Source</a><h4 class="code-header">pub fn <a href="#method.max_concurrent_streams" class="fn">max_concurrent_streams</a>(&amp;self, dir: <a class="enum" href="enum.Dir.html" title="enum iroh_quinn_proto::Dir">Dir</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></h4></section></summary><div class="docblock"><p>Current number of remotely initiated streams that may be concurrently open</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.max_concurrent_streams" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2277-2279">Source</a><h4 class="code-header">pub fn <a href="#method.max_concurrent_streams" class="fn">max_concurrent_streams</a>(&amp;self, dir: <a class="enum" href="enum.Dir.html" title="enum iroh_quinn_proto::Dir">Dir</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></h4></section></summary><div class="docblock"><p>Current number of remotely initiated streams that may be concurrently open</p>
<p>If the target for this limit is reduced using <a href="struct.Connection.html#method.set_max_concurrent_streams" title="method iroh_quinn_proto::Connection::set_max_concurrent_streams"><code>set_max_concurrent_streams</code></a>,
it will not change immediately, even if fewer streams are open. Instead, it will
decrement by one for each time a remotely initiated stream of matching directionality is closed.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_send_window" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2287-2289">Source</a><h4 class="code-header">pub fn <a href="#method.set_send_window" class="fn">set_send_window</a>(&amp;mut self, send_window: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>)</h4></section></summary><div class="docblock"><p>See <a href="struct.TransportConfig.html#method.send_window" title="method iroh_quinn_proto::TransportConfig::send_window"><code>TransportConfig::send_window()</code></a></p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_receive_window" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2292-2296">Source</a><h4 class="code-header">pub fn <a href="#method.set_receive_window" class="fn">set_receive_window</a>(&amp;mut self, receive_window: <a class="struct" href="struct.VarInt.html" title="struct iroh_quinn_proto::VarInt">VarInt</a>)</h4></section></summary><div class="docblock"><p>See <a href="struct.TransportConfig.html#method.receive_window" title="method iroh_quinn_proto::TransportConfig::receive_window"><code>TransportConfig::receive_window()</code></a></p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_multipath_negotiated" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2302-2306">Source</a><h4 class="code-header">pub fn <a href="#method.is_multipath_negotiated" class="fn">is_multipath_negotiated</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Whether the Multipath for QUIC extension is enabled.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_send_window" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2282-2284">Source</a><h4 class="code-header">pub fn <a href="#method.set_send_window" class="fn">set_send_window</a>(&amp;mut self, send_window: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>)</h4></section></summary><div class="docblock"><p>See <a href="struct.TransportConfig.html#method.send_window" title="method iroh_quinn_proto::TransportConfig::send_window"><code>TransportConfig::send_window()</code></a></p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_receive_window" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2287-2291">Source</a><h4 class="code-header">pub fn <a href="#method.set_receive_window" class="fn">set_receive_window</a>(&amp;mut self, receive_window: <a class="struct" href="struct.VarInt.html" title="struct iroh_quinn_proto::VarInt">VarInt</a>)</h4></section></summary><div class="docblock"><p>See <a href="struct.TransportConfig.html#method.receive_window" title="method iroh_quinn_proto::TransportConfig::receive_window"><code>TransportConfig::receive_window()</code></a></p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_multipath_negotiated" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#2297-2301">Source</a><h4 class="code-header">pub fn <a href="#method.is_multipath_negotiated" class="fn">is_multipath_negotiated</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Whether the Multipath for QUIC extension is enabled.</p>
<p>Multipath is only enabled after the handshake is completed and if it was enabled by both
peers.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.local_address_changed" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#4945-4949">Source</a><h4 class="code-header">pub fn <a href="#method.local_address_changed" class="fn">local_address_changed</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Handle a change in the local address, i.e. an active migration</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.current_mtu" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#6032-6039">Source</a><h4 class="code-header">pub fn <a href="#method.current_mtu" class="fn">current_mtu</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a></h4></section></summary><div class="docblock"><p>Storage size required for the largest packet that can be transmitted on all currently
</div></details><details class="toggle method-toggle" open><summary><section id="method.local_address_changed" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#4940-4944">Source</a><h4 class="code-header">pub fn <a href="#method.local_address_changed" class="fn">local_address_changed</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Handle a change in the local address, i.e. an active migration</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.current_mtu" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#6018-6025">Source</a><h4 class="code-header">pub fn <a href="#method.current_mtu" class="fn">current_mtu</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a></h4></section></summary><div class="docblock"><p>Storage size required for the largest packet that can be transmitted on all currently
available paths</p>
<p>Buffers passed to <a href="struct.Connection.html#method.poll_transmit" title="method iroh_quinn_proto::Connection::poll_transmit"><code>Connection::poll_transmit</code></a> should be at least this large.</p>
<p>When multipath is enabled, this value is the minimum MTU across all available paths.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.add_nat_traversal_address" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#6139-6144">Source</a><h4 class="code-header">pub fn <a href="#method.add_nat_traversal_address" class="fn">add_nat_traversal_address</a>(
</div></details><details class="toggle method-toggle" open><summary><section id="method.add_nat_traversal_address" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#6125-6130">Source</a><h4 class="code-header">pub fn <a href="#method.add_nat_traversal_address" class="fn">add_nat_traversal_address</a>(
&amp;mut self,
address: <a class="enum" href="https://doc.rust-lang.org/nightly/core/net/socket_addr/enum.SocketAddr.html" title="enum core::net::socket_addr::SocketAddr">SocketAddr</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="enum" href="iroh_hp/enum.Error.html" title="enum iroh_quinn_proto::iroh_hp::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Add addresses the local endpoint considers are reachable for nat traversal</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.remove_nat_traversal_address" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#6149-6160">Source</a><h4 class="code-header">pub fn <a href="#method.remove_nat_traversal_address" class="fn">remove_nat_traversal_address</a>(
</div></details><details class="toggle method-toggle" open><summary><section id="method.remove_nat_traversal_address" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#6135-6146">Source</a><h4 class="code-header">pub fn <a href="#method.remove_nat_traversal_address" class="fn">remove_nat_traversal_address</a>(
&amp;mut self,
address: <a class="enum" href="https://doc.rust-lang.org/nightly/core/net/socket_addr/enum.SocketAddr.html" title="enum core::net::socket_addr::SocketAddr">SocketAddr</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="enum" href="iroh_hp/enum.Error.html" title="enum iroh_quinn_proto::iroh_hp::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Removes an address the endpoing no longer considers reachable for nat traversal</p>
<p>Addresses not present in the set will be silently ignored.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.get_local_nat_traversal_addresses" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#6163-6165">Source</a><h4 class="code-header">pub fn <a href="#method.get_local_nat_traversal_addresses" class="fn">get_local_nat_traversal_addresses</a>(
</div></details><details class="toggle method-toggle" open><summary><section id="method.get_local_nat_traversal_addresses" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#6149-6151">Source</a><h4 class="code-header">pub fn <a href="#method.get_local_nat_traversal_addresses" class="fn">get_local_nat_traversal_addresses</a>(
&amp;self,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/net/socket_addr/enum.SocketAddr.html" title="enum core::net::socket_addr::SocketAddr">SocketAddr</a>&gt;, <a class="enum" href="iroh_hp/enum.Error.html" title="enum iroh_quinn_proto::iroh_hp::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Get the current local nat traversal addresses</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.get_remote_nat_traversal_addresses" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#6168-6173">Source</a><h4 class="code-header">pub fn <a href="#method.get_remote_nat_traversal_addresses" class="fn">get_remote_nat_traversal_addresses</a>(
</div></details><details class="toggle method-toggle" open><summary><section id="method.get_remote_nat_traversal_addresses" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#6154-6159">Source</a><h4 class="code-header">pub fn <a href="#method.get_remote_nat_traversal_addresses" class="fn">get_remote_nat_traversal_addresses</a>(
&amp;self,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/net/socket_addr/enum.SocketAddr.html" title="enum core::net::socket_addr::SocketAddr">SocketAddr</a>&gt;, <a class="enum" href="iroh_hp/enum.Error.html" title="enum iroh_quinn_proto::iroh_hp::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Get the currently advertised nat traversal addresses by the server</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.initiate_nat_traversal_round" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#6229-6305">Source</a><h4 class="code-header">pub fn <a href="#method.initiate_nat_traversal_round" class="fn">initiate_nat_traversal_round</a>(
</div></details><details class="toggle method-toggle" open><summary><section id="method.initiate_nat_traversal_round" class="method"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#6215-6291">Source</a><h4 class="code-header">pub fn <a href="#method.initiate_nat_traversal_round" class="fn">initiate_nat_traversal_round</a>(
&amp;mut self,
now: <a class="struct" href="https://doc.rust-lang.org/nightly/std/time/struct.Instant.html" title="struct std::time::Instant">Instant</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/net/socket_addr/enum.SocketAddr.html" title="enum core::net::socket_addr::SocketAddr">SocketAddr</a>&gt;, <a class="enum" href="iroh_hp/enum.Error.html" title="enum iroh_quinn_proto::iroh_hp::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Initiates a new nat traversal round</p>
@@ -224,7 +224,7 @@ initiated, the previous one is cancelled, and paths that have not been opened ar
<p>Returns the server addresses that are now being probed.
If addresses fail due to spurious errors, these might succeed later and not be returned in
this set.</p>
</div></details></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-Connection" class="impl"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#6336-6342">Source</a><a href="#impl-Debug-for-Connection" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Connection.html" title="struct iroh_quinn_proto::Connection">Connection</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#6337-6341">Source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-Freeze-for-Connection" class="impl"><a href="#impl-Freeze-for-Connection" class="anchor">§</a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.Connection.html" title="struct iroh_quinn_proto::Connection">Connection</a></h3></section><section id="impl-RefUnwindSafe-for-Connection" class="impl"><a href="#impl-RefUnwindSafe-for-Connection" class="anchor">§</a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Connection.html" title="struct iroh_quinn_proto::Connection">Connection</a></h3></section><section id="impl-Send-for-Connection" class="impl"><a href="#impl-Send-for-Connection" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Connection.html" title="struct iroh_quinn_proto::Connection">Connection</a></h3></section><section id="impl-Sync-for-Connection" class="impl"><a href="#impl-Sync-for-Connection" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Connection.html" title="struct iroh_quinn_proto::Connection">Connection</a></h3></section><section id="impl-Unpin-for-Connection" class="impl"><a href="#impl-Unpin-for-Connection" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Connection.html" title="struct iroh_quinn_proto::Connection">Connection</a></h3></section><section id="impl-UnwindSafe-for-Connection" class="impl"><a href="#impl-UnwindSafe-for-Connection" class="anchor">§</a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Connection.html" title="struct iroh_quinn_proto::Connection">Connection</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#138">Source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where
</div></details></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-Connection" class="impl"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#6322-6328">Source</a><a href="#impl-Debug-for-Connection" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Connection.html" title="struct iroh_quinn_proto::Connection">Connection</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../src/iroh_quinn_proto/connection/mod.rs.html#6323-6327">Source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-Freeze-for-Connection" class="impl"><a href="#impl-Freeze-for-Connection" class="anchor">§</a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.Connection.html" title="struct iroh_quinn_proto::Connection">Connection</a></h3></section><section id="impl-RefUnwindSafe-for-Connection" class="impl"><a href="#impl-RefUnwindSafe-for-Connection" class="anchor">§</a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Connection.html" title="struct iroh_quinn_proto::Connection">Connection</a></h3></section><section id="impl-Send-for-Connection" class="impl"><a href="#impl-Send-for-Connection" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Connection.html" title="struct iroh_quinn_proto::Connection">Connection</a></h3></section><section id="impl-Sync-for-Connection" class="impl"><a href="#impl-Sync-for-Connection" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Connection.html" title="struct iroh_quinn_proto::Connection">Connection</a></h3></section><section id="impl-Unpin-for-Connection" class="impl"><a href="#impl-Unpin-for-Connection" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Connection.html" title="struct iroh_quinn_proto::Connection">Connection</a></h3></section><section id="impl-UnwindSafe-for-Connection" class="impl"><a href="#impl-UnwindSafe-for-Connection" class="anchor">§</a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Connection.html" title="struct iroh_quinn_proto::Connection">Connection</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#138">Source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where
T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#139">Source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#212">Source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214">Source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#221">Source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#222">Source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#785">Source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#788">Source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -&gt; T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -167,53 +167,49 @@
<a href=#167 id=167 data-nosnippet>167</a> ///
<a href=#168 id=168 data-nosnippet>168</a> /// Returns whether a frame was written. At most `max_size` bytes will be written, including
<a href=#169 id=169 data-nosnippet>169</a> /// framing.
<a href=#170 id=170 data-nosnippet>170</a> </span><span class="kw">pub</span>(<span class="kw">super</span>) <span class="kw">fn </span>write&lt;<span class="lifetime">'a</span>, <span class="lifetime">'b</span>&gt;(
<a href=#171 id=171 data-nosnippet>171</a> <span class="kw-2">&amp;mut </span><span class="self">self</span>,
<a href=#172 id=172 data-nosnippet>172</a> builder: <span class="kw-2">&amp;mut </span>PacketBuilder,
<a href=#173 id=173 data-nosnippet>173</a> stats: <span class="kw-2">&amp;mut </span>FrameStats,
<a href=#174 id=174 data-nosnippet>174</a> ) -&gt; bool {
<a href=#175 id=175 data-nosnippet>175</a> <span class="kw">let </span>datagram = <span class="kw">match </span><span class="self">self</span>.outgoing.pop_front() {
<a href=#176 id=176 data-nosnippet>176</a> <span class="prelude-val">Some</span>(x) =&gt; x,
<a href=#177 id=177 data-nosnippet>177</a> <span class="prelude-val">None </span>=&gt; <span class="kw">return </span><span class="bool-val">false</span>,
<a href=#178 id=178 data-nosnippet>178</a> };
<a href=#179 id=179 data-nosnippet>179</a>
<a href=#180 id=180 data-nosnippet>180</a> <span class="kw">if </span>builder.frame_space_remaining() &lt; datagram.size(<span class="bool-val">true</span>) {
<a href=#181 id=181 data-nosnippet>181</a> <span class="comment">// Future work: we could be more clever about cramming small datagrams into
<a href=#182 id=182 data-nosnippet>182</a> // mostly-full packets when a larger one is queued first
<a href=#183 id=183 data-nosnippet>183</a> </span><span class="self">self</span>.outgoing.push_front(datagram);
<a href=#184 id=184 data-nosnippet>184</a> <span class="kw">return </span><span class="bool-val">false</span>;
<a href=#185 id=185 data-nosnippet>185</a> }
<a href=#186 id=186 data-nosnippet>186</a>
<a href=#187 id=187 data-nosnippet>187</a> <span class="macro">trace!</span>(len = datagram.data.len(), <span class="string">"DATAGRAM"</span>);
<a href=#188 id=188 data-nosnippet>188</a>
<a href=#189 id=189 data-nosnippet>189</a> <span class="self">self</span>.outgoing_total -= datagram.data.len();
<a href=#190 id=190 data-nosnippet>190</a> builder.encode(datagram, stats);
<a href=#191 id=191 data-nosnippet>191</a> <span class="bool-val">true
<a href=#192 id=192 data-nosnippet>192</a> </span>}
<a href=#193 id=193 data-nosnippet>193</a>
<a href=#194 id=194 data-nosnippet>194</a> <span class="kw">pub</span>(<span class="kw">super</span>) <span class="kw">fn </span>recv(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; <span class="prelude-ty">Option</span>&lt;Bytes&gt; {
<a href=#195 id=195 data-nosnippet>195</a> <span class="kw">let </span>x = <span class="self">self</span>.incoming.pop_front()<span class="question-mark">?</span>.data;
<a href=#196 id=196 data-nosnippet>196</a> <span class="self">self</span>.recv_buffered -= x.len();
<a href=#197 id=197 data-nosnippet>197</a> <span class="prelude-val">Some</span>(x)
<a href=#198 id=198 data-nosnippet>198</a> }
<a href=#199 id=199 data-nosnippet>199</a>}
<a href=#200 id=200 data-nosnippet>200</a>
<a href=#201 id=201 data-nosnippet>201</a><span class="doccomment">/// Errors that can arise when sending a datagram
<a href=#202 id=202 data-nosnippet>202</a></span><span class="attr">#[derive(Debug, Error, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
<a href=#203 id=203 data-nosnippet>203</a></span><span class="kw">pub enum </span>SendDatagramError {
<a href=#204 id=204 data-nosnippet>204</a> <span class="doccomment">/// The peer does not support receiving datagram frames
<a href=#205 id=205 data-nosnippet>205</a> </span><span class="attr">#[error(<span class="string">"datagrams not supported by peer"</span>)]
<a href=#206 id=206 data-nosnippet>206</a> </span>UnsupportedByPeer,
<a href=#207 id=207 data-nosnippet>207</a> <span class="doccomment">/// Datagram support is disabled locally
<a href=#208 id=208 data-nosnippet>208</a> </span><span class="attr">#[error(<span class="string">"datagram support disabled"</span>)]
<a href=#209 id=209 data-nosnippet>209</a> </span>Disabled,
<a href=#210 id=210 data-nosnippet>210</a> <span class="doccomment">/// The datagram is larger than the connection can currently accommodate
<a href=#211 id=211 data-nosnippet>211</a> ///
<a href=#212 id=212 data-nosnippet>212</a> /// Indicates that the path MTU minus overhead or the limit advertised by the peer has been
<a href=#213 id=213 data-nosnippet>213</a> /// exceeded.
<a href=#214 id=214 data-nosnippet>214</a> </span><span class="attr">#[error(<span class="string">"datagram too large"</span>)]
<a href=#215 id=215 data-nosnippet>215</a> </span>TooLarge,
<a href=#216 id=216 data-nosnippet>216</a> <span class="doccomment">/// Send would block
<a href=#217 id=217 data-nosnippet>217</a> </span><span class="attr">#[error(<span class="string">"datagram send blocked"</span>)]
<a href=#218 id=218 data-nosnippet>218</a> </span>Blocked(Bytes),
<a href=#219 id=219 data-nosnippet>219</a>}</code></pre></div></section></main></body></html>
<a href=#170 id=170 data-nosnippet>170</a> </span><span class="kw">pub</span>(<span class="kw">super</span>) <span class="kw">fn </span>write&lt;<span class="lifetime">'a</span>, <span class="lifetime">'b</span>&gt;(<span class="kw-2">&amp;mut </span><span class="self">self</span>, buf: <span class="kw-2">&amp;mut </span>PacketBuilder, stat: <span class="kw-2">&amp;mut </span>FrameStats) -&gt; bool {
<a href=#171 id=171 data-nosnippet>171</a> <span class="kw">let </span>datagram = <span class="kw">match </span><span class="self">self</span>.outgoing.pop_front() {
<a href=#172 id=172 data-nosnippet>172</a> <span class="prelude-val">Some</span>(x) =&gt; x,
<a href=#173 id=173 data-nosnippet>173</a> <span class="prelude-val">None </span>=&gt; <span class="kw">return </span><span class="bool-val">false</span>,
<a href=#174 id=174 data-nosnippet>174</a> };
<a href=#175 id=175 data-nosnippet>175</a>
<a href=#176 id=176 data-nosnippet>176</a> <span class="kw">if </span>buf.frame_space_remaining() &lt; datagram.size(<span class="bool-val">true</span>) {
<a href=#177 id=177 data-nosnippet>177</a> <span class="comment">// Future work: we could be more clever about cramming small datagrams into
<a href=#178 id=178 data-nosnippet>178</a> // mostly-full packets when a larger one is queued first
<a href=#179 id=179 data-nosnippet>179</a> </span><span class="self">self</span>.outgoing.push_front(datagram);
<a href=#180 id=180 data-nosnippet>180</a> <span class="kw">return </span><span class="bool-val">false</span>;
<a href=#181 id=181 data-nosnippet>181</a> }
<a href=#182 id=182 data-nosnippet>182</a>
<a href=#183 id=183 data-nosnippet>183</a> <span class="macro">trace!</span>(len = datagram.data.len(), <span class="string">"DATAGRAM"</span>);
<a href=#184 id=184 data-nosnippet>184</a>
<a href=#185 id=185 data-nosnippet>185</a> <span class="self">self</span>.outgoing_total -= datagram.data.len();
<a href=#186 id=186 data-nosnippet>186</a> buf.encode(datagram, stat);
<a href=#187 id=187 data-nosnippet>187</a> <span class="bool-val">true
<a href=#188 id=188 data-nosnippet>188</a> </span>}
<a href=#189 id=189 data-nosnippet>189</a>
<a href=#190 id=190 data-nosnippet>190</a> <span class="kw">pub</span>(<span class="kw">super</span>) <span class="kw">fn </span>recv(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; <span class="prelude-ty">Option</span>&lt;Bytes&gt; {
<a href=#191 id=191 data-nosnippet>191</a> <span class="kw">let </span>x = <span class="self">self</span>.incoming.pop_front()<span class="question-mark">?</span>.data;
<a href=#192 id=192 data-nosnippet>192</a> <span class="self">self</span>.recv_buffered -= x.len();
<a href=#193 id=193 data-nosnippet>193</a> <span class="prelude-val">Some</span>(x)
<a href=#194 id=194 data-nosnippet>194</a> }
<a href=#195 id=195 data-nosnippet>195</a>}
<a href=#196 id=196 data-nosnippet>196</a>
<a href=#197 id=197 data-nosnippet>197</a><span class="doccomment">/// Errors that can arise when sending a datagram
<a href=#198 id=198 data-nosnippet>198</a></span><span class="attr">#[derive(Debug, Error, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
<a href=#199 id=199 data-nosnippet>199</a></span><span class="kw">pub enum </span>SendDatagramError {
<a href=#200 id=200 data-nosnippet>200</a> <span class="doccomment">/// The peer does not support receiving datagram frames
<a href=#201 id=201 data-nosnippet>201</a> </span><span class="attr">#[error(<span class="string">"datagrams not supported by peer"</span>)]
<a href=#202 id=202 data-nosnippet>202</a> </span>UnsupportedByPeer,
<a href=#203 id=203 data-nosnippet>203</a> <span class="doccomment">/// Datagram support is disabled locally
<a href=#204 id=204 data-nosnippet>204</a> </span><span class="attr">#[error(<span class="string">"datagram support disabled"</span>)]
<a href=#205 id=205 data-nosnippet>205</a> </span>Disabled,
<a href=#206 id=206 data-nosnippet>206</a> <span class="doccomment">/// The datagram is larger than the connection can currently accommodate
<a href=#207 id=207 data-nosnippet>207</a> ///
<a href=#208 id=208 data-nosnippet>208</a> /// Indicates that the path MTU minus overhead or the limit advertised by the peer has been
<a href=#209 id=209 data-nosnippet>209</a> /// exceeded.
<a href=#210 id=210 data-nosnippet>210</a> </span><span class="attr">#[error(<span class="string">"datagram too large"</span>)]
<a href=#211 id=211 data-nosnippet>211</a> </span>TooLarge,
<a href=#212 id=212 data-nosnippet>212</a> <span class="doccomment">/// Send would block
<a href=#213 id=213 data-nosnippet>213</a> </span><span class="attr">#[error(<span class="string">"datagram send blocked"</span>)]
<a href=#214 id=214 data-nosnippet>214</a> </span>Blocked(Bytes),
<a href=#215 id=215 data-nosnippet>215</a>}</code></pre></div></section></main></body></html>
File diff suppressed because it is too large Load Diff
@@ -224,11 +224,11 @@
<a href=#224 id=224 data-nosnippet>224</a>
<a href=#225 id=225 data-nosnippet>225</a> <span class="kw">pub</span>(<span class="kw">super</span>) <span class="kw">fn </span>encode&lt;<span class="lifetime">'c</span>&gt;(
<a href=#226 id=226 data-nosnippet>226</a> <span class="kw-2">&amp;mut </span><span class="self">self</span>,
<a href=#227 id=227 data-nosnippet>227</a> frame: <span class="kw">impl </span>Into&lt;EncodableFrame&lt;<span class="lifetime">'c</span>&gt;&gt;,
<a href=#227 id=227 data-nosnippet>227</a> frame: <span class="kw">impl </span>Into&lt;EncodableFrame&lt;<span class="lifetime">'c</span>&gt;&gt; + Encodable,
<a href=#228 id=228 data-nosnippet>228</a> stats: <span class="kw-2">&amp;mut </span>FrameStats,
<a href=#229 id=229 data-nosnippet>229</a> ) {
<a href=#230 id=230 data-nosnippet>230</a> <span class="kw">let </span>frame = frame.into();
<a href=#231 id=231 data-nosnippet>231</a> frame.encode(<span class="kw-2">&amp;mut </span><span class="self">self</span>.frame_space_mut());
<a href=#230 id=230 data-nosnippet>230</a> frame.encode(<span class="kw-2">&amp;mut </span><span class="self">self</span>.frame_space_mut());
<a href=#231 id=231 data-nosnippet>231</a> <span class="kw">let </span>frame = frame.into();
<a href=#232 id=232 data-nosnippet>232</a> stats.record(frame.get_type());
<a href=#233 id=233 data-nosnippet>233</a> <span class="self">self</span>.qlog.record(<span class="kw-2">&amp;</span>frame);
<a href=#234 id=234 data-nosnippet>234</a> <span class="self">self</span>.sent_frames.sent(frame);
File diff suppressed because it is too large Load Diff