Files
noq/pr/708/docs/noq_proto/struct.Connection.html
T

277 lines
84 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 lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Protocol state and logic for a single QUIC connection"><title>Connection in noq_proto - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="noq_proto" data-themes="" data-resource-suffix="" data-rustdoc-version="1.92.0-nightly (b6f0945e4 2025-10-08)" data-channel="nightly" data-search-js="search-8d3311b9.js" data-stringdex-js="stringdex-828709d0.js" data-settings-js="settings-c38705f0.js" ><script src="../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-ce535bd0.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Connection</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../noq_proto/index.html">noq_<wbr>proto</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Connection</a></h2><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.accepted_0rtt" title="accepted_0rtt">accepted_0rtt</a></li><li><a href="#method.add_nat_traversal_address" title="add_nat_traversal_address">add_nat_traversal_address</a></li><li><a href="#method.close" title="close">close</a></li><li><a href="#method.close_path" title="close_path">close_path</a></li><li><a href="#method.congestion_state" title="congestion_state">congestion_state</a></li><li><a href="#method.crypto_session" title="crypto_session">crypto_session</a></li><li><a href="#method.current_mtu" title="current_mtu">current_mtu</a></li><li><a href="#method.datagrams" title="datagrams">datagrams</a></li><li><a href="#method.force_key_update" title="force_key_update">force_key_update</a></li><li><a href="#method.get_local_nat_traversal_addresses" title="get_local_nat_traversal_addresses">get_local_nat_traversal_addresses</a></li><li><a href="#method.get_remote_nat_traversal_addresses" title="get_remote_nat_traversal_addresses">get_remote_nat_traversal_addresses</a></li><li><a href="#method.handle_event" title="handle_event">handle_event</a></li><li><a href="#method.handle_network_change" title="handle_network_change">handle_network_change</a></li><li><a href="#method.handle_timeout" title="handle_timeout">handle_timeout</a></li><li><a href="#method.has_0rtt" title="has_0rtt">has_0rtt</a></li><li><a href="#method.has_pending_retransmits" title="has_pending_retransmits">has_pending_retransmits</a></li><li><a href="#method.initiate_nat_traversal_round" title="initiate_nat_traversal_round">initiate_nat_traversal_round</a></li><li><a href="#method.is_closed" title="is_closed">is_closed</a></li><li><a href="#method.is_drained" title="is_drained">is_drained</a></li><li><a href="#method.is_handshaking" title="is_handshaking">is_handshaking</a></li><li><a href="#method.is_multipath_negotiated" title="is_multipath_negotiated">is_multipath_negotiated</a></li><li><a href="#method.max_concurrent_streams" title="max_concurrent_streams">max_concurrent_streams</a></li><li><a href="#method.network_path" title="network_path">network_path</a></li><li><a href="#method.open_path" title="open_path">open_path</a></li><li><a href="#method.open_path_ensure" title="open_path_ensure">open_path_ensure</a></li><li><a href="#method.path_observed_address" title="path_observed_address">path_observed_address</a></li><li><a href="#method.path_stats" title="path_stats">path_stats</a></li><li><a href="#method.path_status" title="path_status">path_status</a></li><li><a href="#method.paths" title="paths">paths</a></li><li><a href="#method.ping" title="ping">ping</a></li><li><a href="#method.ping_path" title="ping_path">ping_path</a></li><li><a href="#method.poll" title="poll">poll</a></li><li><a href="#method.poll_endpoint_events" title="poll_endpoint_events">poll_endpoint_events</a></li><li><a href="#method.poll_timeout" title="poll_timeout">poll_timeout</a></li><li><a href="#method.poll_transmit" title="poll_transmit">poll_transmit</a></li><li><a href="#method.recv_stream" title="recv_stream">recv_stream</a></li><li><a href="#method.remote_path_status" title="remote_path_status">remote_path_status</a></li><li><a href="#method.remove_nat_traversal_address" title="remove_nat_traversal_address">remove_nat_traversal_address</a></li><li><a href="#method.rtt" title="rtt">rtt</a></li><li><a href="#method.send_stream" title="send_stream">send_stream</a></li><li><a href="#method.set_max_concurrent_paths" title="set_max_concurrent_paths">set_max_concurrent_paths</a></li><li><a href="#method.set_max_concurrent_streams" title="set_max_concurrent_streams">set_max_concurrent_streams</a></li><li><a href="#method.set_path_keep_alive_interval" title="set_path_keep_alive_interval">set_path_keep_alive_interval</a></li><li><a href="#method.set_path_max_idle_timeout" title="set_path_max_idle_timeout">set_path_max_idle_timeout</a></li><li><a href="#method.set_path_status" title="set_path_status">set_path_status</a></li><li><a href="#method.set_receive_window" title="set_receive_window">set_receive_window</a></li><li><a href="#method.set_send_window" title="set_send_window">set_send_window</a></li><li><a href="#method.side" title="side">side</a></li><li><a href="#method.stats" title="stats">stats</a></li><li><a href="#method.streams" title="streams">streams</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Debug-for-Connection" title="Debug">Debug</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-Freeze-for-Connection" title="!Freeze">!Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-Connection" title="!RefUnwindSafe">!RefUnwindSafe</a></li><li><a href="#impl-UnwindSafe-for-Connection" title="!UnwindSafe">!UnwindSafe</a></li><li><a href="#impl-Send-for-Connection" title="Send">Send</a></li><li><a href="#impl-Sync-for-Connection" title="Sync">Sync</a></li><li><a href="#impl-Unpin-for-Connection" title="Unpin">Unpin</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T" title="Any">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T" title="Borrow&#60;T&#62;">Borrow&#60;T&#62;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T" title="BorrowMut&#60;T&#62;">BorrowMut&#60;T&#62;</a></li><li><a href="#impl-From%3CT%3E-for-T" title="From&#60;T&#62;">From&#60;T&#62;</a></li><li><a href="#impl-Instrument-for-T" title="Instrument">Instrument</a></li><li><a href="#impl-Into%3CU%3E-for-T" title="Into&#60;U&#62;">Into&#60;U&#62;</a></li><li><a href="#impl-IntoEither-for-T" title="IntoEither">IntoEither</a></li><li><a href="#impl-Same-for-T" title="Same">Same</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T" title="TryFrom&#60;U&#62;">TryFrom&#60;U&#62;</a></li><li><a href="#impl-TryInto%3CU%3E-for-T" title="TryInto&#60;U&#62;">TryInto&#60;U&#62;</a></li><li><a href="#impl-WithSubscriber-for-T" title="WithSubscriber">WithSubscriber</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate noq_<wbr>proto</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="index.html">noq_proto</a></div><h1>Struct <span class="struct">Connection</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/noq_proto/connection/mod.rs.html#158-313">Source</a> </span></div><pre class="rust item-decl"><code>pub struct Connection { <span class="comment">/* private fields */</span> }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Protocol state and logic for a single QUIC connection</p>
<p>Objects of this type receive <a href="struct.ConnectionEvent.html" title="struct noq_proto::ConnectionEvent"><code>ConnectionEvent</code></a>s and emit <a href="struct.EndpointEvent.html" title="struct noq_proto::EndpointEvent"><code>EndpointEvent</code></a>s and application
<a href="enum.Event.html" title="enum noq_proto::Event"><code>Event</code></a>s to make progress. To handle timeouts, a <code>Connection</code> returns timer updates and
expects timeouts through various methods. A number of simple getter methods are exposed
to allow callers to inspect some of the connection state.</p>
<p><code>Connection</code> has roughly 4 types of methods:</p>
<ul>
<li>A. Simple getters, taking <code>&amp;self</code></li>
<li>B. Handlers for incoming events from the network or system, named <code>handle_*</code>.</li>
<li>C. State machine mutators, for incoming commands from the application. For convenience we
refer to this as “performing I/O” below, however as per the design of this library none of the
functions actually perform system-level I/O. For example, <a href="struct.RecvStream.html#method.read" title="method noq_proto::RecvStream::read"><code>read</code></a> and
<a href="struct.SendStream.html#method.write" title="method noq_proto::SendStream::write"><code>write</code></a>, but also things like <a href="struct.SendStream.html#method.reset" title="method noq_proto::SendStream::reset"><code>reset</code></a>.</li>
<li>D. Polling functions for outgoing events or actions for the caller to
take, named <code>poll_*</code>.</li>
</ul>
<p>The simplest way to use this API correctly is to call (B) and (C) whenever
appropriate, then after each of those calls, as soon as feasible call all
polling methods (D) and deal with their outputs appropriately, e.g. by
passing it to the application or by making a system-level I/O call. You
should call the polling functions in this order:</p>
<ol>
<li><a href="struct.Connection.html#method.poll_transmit" title="method noq_proto::Connection::poll_transmit"><code>poll_transmit</code></a></li>
<li><a href="struct.Connection.html#method.poll_timeout" title="method noq_proto::Connection::poll_timeout"><code>poll_timeout</code></a></li>
<li><a href="struct.Connection.html#method.poll_endpoint_events" title="method noq_proto::Connection::poll_endpoint_events"><code>poll_endpoint_events</code></a></li>
<li><a href="struct.Connection.html#method.poll" title="method noq_proto::Connection::poll"><code>poll</code></a></li>
</ol>
<p>Currently the only actual dependency is from (2) to (1), however additional
dependencies may be added in future, so the above order is recommended.</p>
<p>(A) may be called whenever desired.</p>
<p>Care should be made to ensure that the input events represent monotonically
increasing time. Specifically, calling <a href="struct.Connection.html#method.handle_timeout" title="method noq_proto::Connection::handle_timeout"><code>handle_timeout</code></a>
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 noq_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/noq_proto/connection/mod.rs.html#315-7225">Source</a><a href="#impl-Connection" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.Connection.html" title="struct noq_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/noq_proto/connection/mod.rs.html#455-457">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>
<li>a call was made to <code>handle_event</code></li>
<li>a call to <code>poll_transmit</code> returned <code>Some</code></li>
<li>a call was made to <code>handle_timeout</code></li>
</ul>
</div></details><details class="toggle method-toggle" open><summary><section id="method.poll" class="method"><a class="src rightside" href="../src/noq_proto/connection/mod.rs.html#465-479">Source</a><h4 class="code-header">pub fn <a href="#method.poll" class="fn">poll</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="enum" href="enum.Event.html" title="enum noq_proto::Event">Event</a>&gt;</h4></section></summary><div class="docblock"><p>Returns application-facing events</p>
<p>Connections should be polled for events after:</p>
<ul>
<li>a call was made to <code>handle_event</code></li>
<li>a call was made to <code>handle_timeout</code></li>
</ul>
</div></details><details class="toggle method-toggle" open><summary><section id="method.poll_endpoint_events" class="method"><a class="src rightside" href="../src/noq_proto/connection/mod.rs.html#483-485">Source</a><h4 class="code-header">pub fn <a href="#method.poll_endpoint_events" class="fn">poll_endpoint_events</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="struct.EndpointEvent.html" title="struct noq_proto::EndpointEvent">EndpointEvent</a>&gt;</h4></section></summary><div class="docblock"><p>Return endpoint-facing events</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.streams" class="method"><a class="src rightside" href="../src/noq_proto/connection/mod.rs.html#489-494">Source</a><h4 class="code-header">pub fn <a href="#method.streams" class="fn">streams</a>(&amp;mut self) -&gt; <a class="struct" href="struct.Streams.html" title="struct noq_proto::Streams">Streams</a>&lt;'_&gt;</h4></section></summary><div class="docblock"><p>Provide control over streams</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.recv_stream" class="method"><a class="src rightside" href="../src/noq_proto/connection/mod.rs.html#498-505">Source</a><h4 class="code-header">pub fn <a href="#method.recv_stream" class="fn">recv_stream</a>(&amp;mut self, id: <a class="struct" href="struct.StreamId.html" title="struct noq_proto::StreamId">StreamId</a>) -&gt; <a class="struct" href="struct.RecvStream.html" title="struct noq_proto::RecvStream">RecvStream</a>&lt;'_&gt;</h4></section></summary><div class="docblock"><p>Provide control over streams</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.send_stream" class="method"><a class="src rightside" href="../src/noq_proto/connection/mod.rs.html#509-517">Source</a><h4 class="code-header">pub fn <a href="#method.send_stream" class="fn">send_stream</a>(&amp;mut self, id: <a class="struct" href="struct.StreamId.html" title="struct noq_proto::StreamId">StreamId</a>) -&gt; <a class="struct" href="struct.SendStream.html" title="struct noq_proto::SendStream">SendStream</a>&lt;'_&gt;</h4></section></summary><div class="docblock"><p>Provide control over streams</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.open_path_ensure" class="method"><a class="src rightside" href="../src/noq_proto/connection/mod.rs.html#535-549">Source</a><h4 class="code-header">pub fn <a href="#method.open_path_ensure" class="fn">open_path_ensure</a>(
&amp;mut self,
network_path: <a class="struct" href="struct.FourTuple.html" title="struct noq_proto::FourTuple">FourTuple</a>,
initial_status: <a class="enum" href="enum.PathStatus.html" title="enum noq_proto::PathStatus">PathStatus</a>,
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="struct.PathId.html" title="struct noq_proto::PathId">PathId</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>), <a class="enum" href="enum.PathError.html" title="enum noq_proto::PathError">PathError</a>&gt;</h4></section></summary><div class="docblock"><p>Opens a new path only if no path on the same network path currently exists.</p>
<p>Returns <code>(path_id, true)</code> if the path already existed, or <code>(path_id, false)</code>
if was opened.</p>
<p>If <code>network_path</code> has no local IP set, then this will open a new path
if no path exists for this remote address, independent of the existing
paths local IP. If a local IP is set, it will match against the full
four-tuple of existing paths. Not setting the local IP avoids having to
guess which local interface will be used to communicate with the remote,
should it not be known yet. We assume that if we already have a path to
the remote, the OS is likely to use the same interface to talk to said remote.</p>
<p>See also <a href="struct.Connection.html#method.open_path" title="method noq_proto::Connection::open_path"><code>open_path</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.open_path" class="method"><a class="src rightside" href="../src/noq_proto/connection/mod.rs.html#556-600">Source</a><h4 class="code-header">pub fn <a href="#method.open_path" class="fn">open_path</a>(
&amp;mut self,
network_path: <a class="struct" href="struct.FourTuple.html" title="struct noq_proto::FourTuple">FourTuple</a>,
initial_status: <a class="enum" href="enum.PathStatus.html" title="enum noq_proto::PathStatus">PathStatus</a>,
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="struct.PathId.html" title="struct noq_proto::PathId">PathId</a>, <a class="enum" href="enum.PathError.html" title="enum noq_proto::PathError">PathError</a>&gt;</h4></section></summary><div class="docblock"><p>Opens a new path.</p>
<p>Further errors might occur and they will be emitted in <a href="enum.PathEvent.html#variant.Abandoned" title="variant noq_proto::PathEvent::Abandoned"><code>PathEvent::Abandoned</code></a>
events with this path id. Once the path is opened and can carry application data it
will be reported using a <a href="enum.PathEvent.html#variant.Established" title="variant noq_proto::PathEvent::Established"><code>PathEvent::Established</code></a> event.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.close_path" class="method"><a class="src rightside" href="../src/noq_proto/connection/mod.rs.html#607-618">Source</a><h4 class="code-header">pub fn <a href="#method.close_path" class="fn">close_path</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>,
path_id: <a class="struct" href="struct.PathId.html" title="struct noq_proto::PathId">PathId</a>,
error_code: <a class="struct" href="struct.VarInt.html" title="struct noq_proto::VarInt">VarInt</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="enum.ClosePathError.html" title="enum noq_proto::ClosePathError">ClosePathError</a>&gt;</h4></section></summary><div class="docblock"><p>Closes a path and sends a PATH_ABANDON frame with the passed error code.</p>
<p>Returns <a href="enum.ClosePathError.html#variant.LastOpenPath" title="variant noq_proto::ClosePathError::LastOpenPath"><code>ClosePathError::LastOpenPath</code></a> if this is the last open path.
It does allow closing paths which have not yet been opened, as e.g. is the case
when receiving a PATH_ABANDON from the peer for a path that was never opened locally.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.paths" class="method"><a class="src rightside" href="../src/noq_proto/connection/mod.rs.html#803-805">Source</a><h4 class="code-header">pub fn <a href="#method.paths" class="fn">paths</a>(&amp;self) -&gt; <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="struct" href="struct.PathId.html" title="struct noq_proto::PathId">PathId</a>&gt;</h4></section></summary><div class="docblock"><p>Returns all known paths.</p>
<p>There is no guarantee any of these paths are open or usable.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.path_status" class="method"><a class="src rightside" href="../src/noq_proto/connection/mod.rs.html#808-812">Source</a><h4 class="code-header">pub fn <a href="#method.path_status" class="fn">path_status</a>(&amp;self, path_id: <a class="struct" href="struct.PathId.html" title="struct noq_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="enum.PathStatus.html" title="enum noq_proto::PathStatus">PathStatus</a>, <a class="struct" href="struct.ClosedPath.html" title="struct noq_proto::ClosedPath">ClosedPath</a>&gt;</h4></section></summary><div class="docblock"><p>Gets the local <a href="enum.PathStatus.html" title="enum noq_proto::PathStatus"><code>PathStatus</code></a> for a known <a href="struct.PathId.html" title="struct noq_proto::PathId"><code>PathId</code></a></p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.network_path" class="method"><a class="src rightside" href="../src/noq_proto/connection/mod.rs.html#815-819">Source</a><h4 class="code-header">pub fn <a href="#method.network_path" class="fn">network_path</a>(&amp;self, path_id: <a class="struct" href="struct.PathId.html" title="struct noq_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="struct" href="struct.FourTuple.html" title="struct noq_proto::FourTuple">FourTuple</a>, <a class="struct" href="struct.ClosedPath.html" title="struct noq_proto::ClosedPath">ClosedPath</a>&gt;</h4></section></summary><div class="docblock"><p>Returns the paths network path represented as a 4-tuple.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_path_status" class="method"><a class="src rightside" href="../src/noq_proto/connection/mod.rs.html#824-846">Source</a><h4 class="code-header">pub fn <a href="#method.set_path_status" class="fn">set_path_status</a>(
&amp;mut self,
path_id: <a class="struct" href="struct.PathId.html" title="struct noq_proto::PathId">PathId</a>,
status: <a class="enum" href="enum.PathStatus.html" title="enum noq_proto::PathStatus">PathStatus</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="enum.PathStatus.html" title="enum noq_proto::PathStatus">PathStatus</a>, <a class="enum" href="enum.SetPathStatusError.html" title="enum noq_proto::SetPathStatusError">SetPathStatusError</a>&gt;</h4></section></summary><div class="docblock"><p>Sets the <a href="enum.PathStatus.html" title="enum noq_proto::PathStatus"><code>PathStatus</code></a> for a known <a href="struct.PathId.html" title="struct noq_proto::PathId"><code>PathId</code></a></p>
<p>Returns the previous path status on success.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.remote_path_status" class="method"><a class="src rightside" href="../src/noq_proto/connection/mod.rs.html#852-854">Source</a><h4 class="code-header">pub fn <a href="#method.remote_path_status" class="fn">remote_path_status</a>(&amp;self, path_id: <a class="struct" href="struct.PathId.html" title="struct noq_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="enum" href="enum.PathStatus.html" title="enum noq_proto::PathStatus">PathStatus</a>&gt;</h4></section></summary><div class="docblock"><p>Returns the remote path status</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_path_max_idle_timeout" class="method"><a class="src rightside" href="../src/noq_proto/connection/mod.rs.html#864-897">Source</a><h4 class="code-header">pub fn <a href="#method.set_path_max_idle_timeout" class="fn">set_path_max_idle_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>,
path_id: <a class="struct" href="struct.PathId.html" title="struct noq_proto::PathId">PathId</a>,
timeout: <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;,
) -&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 noq_proto::ClosedPath">ClosedPath</a>&gt;</h4></section></summary><div class="docblock"><p>Sets the max_idle_timeout for a specific path.</p>
<p>The PathIdle timer is immediately re-armed accounting for already-elapsed
idle time. Setting <code>None</code> disables the timeout and stops the timer.</p>
<p>See <a href="struct.TransportConfig.html#method.default_path_max_idle_timeout" title="method noq_proto::TransportConfig::default_path_max_idle_timeout"><code>TransportConfig::default_path_max_idle_timeout</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.set_path_keep_alive_interval" class="method"><a class="src rightside" href="../src/noq_proto/connection/mod.rs.html#904-914">Source</a><h4 class="code-header">pub fn <a href="#method.set_path_keep_alive_interval" class="fn">set_path_keep_alive_interval</a>(
&amp;mut self,
path_id: <a class="struct" href="struct.PathId.html" title="struct noq_proto::PathId">PathId</a>,
interval: <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;,
) -&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 noq_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 noq_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/noq_proto/connection/mod.rs.html#1019-1119">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>,
buf: &amp;mut <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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;,
) -&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.Transmit.html" title="struct noq_proto::Transmit">Transmit</a>&gt;</h4></section></summary><div class="docblock"><p>Returns packets to transmit</p>
<p>Connections should be polled for transmit after:</p>
<ul>
<li>the application performed some I/O on the connection</li>
<li>a call was made to <code>handle_event</code></li>
<li>a call was made to <code>handle_timeout</code></li>
</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/noq_proto/connection/mod.rs.html#2184-2275">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 noq_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/noq_proto/connection/mod.rs.html#2395-2579">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/noq_proto/connection/mod.rs.html#2592-2597">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 noq_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 applications 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 noq_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 noq_proto::StreamEvent::Finished"><code>StreamEvent::Finished</code></a> event.</p>
<p>If <a href="struct.Streams.html#method.send_streams" title="method noq_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/noq_proto/connection/mod.rs.html#2625-2627">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 noq_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/noq_proto/connection/mod.rs.html#2630-2642">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 noq_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/noq_proto/connection/mod.rs.html#2645-2652">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 noq_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 noq_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/noq_proto/connection/mod.rs.html#2657-2663">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/noq_proto/connection/mod.rs.html#2668-2675">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 noq_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 noq_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/noq_proto/connection/mod.rs.html#2680-2692">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/noq_proto/connection/mod.rs.html#2695-2697">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 noq_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/noq_proto/connection/mod.rs.html#2708-2710">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 <a href="enum.Event.html#variant.Connected" title="variant noq_proto::Event::Connected"><code>Connected</code></a> or <a href="enum.Event.html#variant.ConnectionLost" title="variant noq_proto::Event::ConnectionLost"><code>ConnectionLost</code></a>
event respectively. Note that locally-initiated closes via <a href="struct.Connection.html#method.close" title="method noq_proto::Connection::close"><code>close()</code></a> do not
emit a <code>ConnectionLost</code> event.</p>
<p>For an established connection this essentially means the handshake is <strong>completed</strong>,
but not necessarily yet confirmed.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_closed" class="method"><a class="src rightside" href="../src/noq_proto/connection/mod.rs.html#2722-2724">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 <a href="enum.Event.html#variant.ConnectionLost" title="variant noq_proto::Event::ConnectionLost"><code>ConnectionLost</code></a> event is emitted with details when the
connection is closed by the peer or due to an error. When the local application closes
the connection via <a href="struct.Connection.html#method.close" title="method noq_proto::Connection::close"><code>close()</code></a>, no <code>ConnectionLost</code> event is emitted;
instead, pending operations fail with <a href="enum.ConnectionError.html#variant.LocallyClosed" title="variant noq_proto::ConnectionError::LocallyClosed"><code>ConnectionError::LocallyClosed</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_drained" class="method"><a class="src rightside" href="../src/noq_proto/connection/mod.rs.html#2730-2732">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/noq_proto/connection/mod.rs.html#2737-2739">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/noq_proto/connection/mod.rs.html#2742-2744">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/noq_proto/connection/mod.rs.html#2747-2749">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/noq_proto/connection/mod.rs.html#2752-2754">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 noq_proto::Side">Side</a></h4></section></summary><div class="docblock"><p>Look up whether were 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/noq_proto/connection/mod.rs.html#2757-2766">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 noq_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 noq_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/noq_proto/connection/mod.rs.html#2769-2771">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 noq_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 connections 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/noq_proto/connection/mod.rs.html#2774-2776">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 noq_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 noq_proto::congestion::Controller">Controller</a>&gt;</h4></section></summary><div class="docblock"><p>Current state of this connections 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/noq_proto/connection/mod.rs.html#2782-2788">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 noq_proto::Dir">Dir</a>, count: <a class="struct" href="struct.VarInt.html" title="struct noq_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/noq_proto/connection/mod.rs.html#2799-2820">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>,
) -&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.MultipathNotNegotiated.html" title="struct noq_proto::MultipathNotNegotiated">MultipathNotNegotiated</a>&gt;</h4></section></summary><div class="docblock"><p>Modify the number of open paths allowed when multipath is enabled</p>
<p>When reducing the number of concurrent paths this will only affect delaying sending
new MAX_PATH_ID frames until fewer than this number of paths are possible. To
actively reduce paths they must be closed using <a href="struct.Connection.html#method.close_path" title="method noq_proto::Connection::close_path"><code>Connection::close_path</code></a>, which
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 noq_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/noq_proto/connection/mod.rs.html#2839-2841">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 noq_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 noq_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/noq_proto/connection/mod.rs.html#2844-2846">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 noq_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/noq_proto/connection/mod.rs.html#2849-2853">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 noq_proto::VarInt">VarInt</a>)</h4></section></summary><div class="docblock"><p>See <a href="struct.TransportConfig.html#method.receive_window" title="method noq_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/noq_proto/connection/mod.rs.html#2859-2863">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.handle_network_change" class="method"><a class="src rightside" href="../src/noq_proto/connection/mod.rs.html#5819-5960">Source</a><h4 class="code-header">pub fn <a href="#method.handle_network_change" class="fn">handle_network_change</a>(
&amp;mut self,
hint: <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="trait.NetworkChangeHint.html" title="trait noq_proto::NetworkChangeHint">NetworkChangeHint</a>&gt;,
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>Handle a change in the local address, i.e. an active migration</p>
<p>In the general (non-multipath) case, paths will perform a RFC9000 migration and be pinged
for a liveness check. This is the behaviour of a path assumed to be recoverable, even if
this is not the case.</p>
<p>Clients in a connection in which multipath has been negotiated should migrate paths to new
<a href="struct.PathId.html" title="struct noq_proto::PathId"><code>PathId</code></a>s. For paths that are known to be non-recoverable can be migrated to a new
<a href="struct.PathId.html" title="struct noq_proto::PathId"><code>PathId</code></a> by closing the current path, and opening a new one to the same remote. Treating
paths as non recoverable when necessary accelerates connectivity re-establishment, or might
allow it altogether.</p>
<p>The optional <code>hint</code> allows callers to indicate when paths are non-recoverable and should be
migrated to new a <a href="struct.PathId.html" title="struct noq_proto::PathId"><code>PathId</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.current_mtu" class="method"><a class="src rightside" href="../src/noq_proto/connection/mod.rs.html#7014-7021">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 noq_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/noq_proto/connection/mod.rs.html#7132-7140">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="n0_nat_traversal/enum.Error.html" title="enum noq_proto::n0_nat_traversal::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/noq_proto/connection/mod.rs.html#7145-7156">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="n0_nat_traversal/enum.Error.html" title="enum noq_proto::n0_nat_traversal::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/noq_proto/connection/mod.rs.html#7159-7163">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="n0_nat_traversal/enum.Error.html" title="enum noq_proto::n0_nat_traversal::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/noq_proto/connection/mod.rs.html#7166-7173">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="n0_nat_traversal/enum.Error.html" title="enum noq_proto::n0_nat_traversal::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/noq_proto/connection/mod.rs.html#7186-7212">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="n0_nat_traversal/enum.Error.html" title="enum noq_proto::n0_nat_traversal::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Initiates a new nat traversal round</p>
<p>A nat traversal round involves advertising the clients local addresses in
<code>REACH_OUT</code> frames, and initiating probing of the known remote addresses. When a new
round is initiated, the previous one is cancelled.</p>
<p>For all probes that succeed, if any, a new path will be opened on the successful
4-tuple.</p>
<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/noq_proto/connection/mod.rs.html#7227-7233">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 noq_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/noq_proto/connection/mod.rs.html#7228-7232">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 noq_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 noq_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 noq_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 noq_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 noq_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 noq_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>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Instrument-for-T" class="impl"><a href="#impl-Instrument-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; Instrument for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.instrument" class="method trait-impl"><a href="#method.instrument" class="anchor">§</a><h4 class="code-header">fn <a class="fn">instrument</a>(self, span: Span) -&gt; Instrumented&lt;Self&gt;</h4></section></summary><div class='docblock'>Instruments this type with the provided [<code>Span</code>], returning an
<code>Instrumented</code> wrapper. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.in_current_span" class="method trait-impl"><a href="#method.in_current_span" class="anchor">§</a><h4 class="code-header">fn <a class="fn">in_current_span</a>(self) -&gt; Instrumented&lt;Self&gt;</h4></section></summary><div class='docblock'>Instruments this type with the <a href="super::Span::current()">current</a> <a href="crate::Span"><code>Span</code></a>, returning an
<code>Instrumented</code> wrapper. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#767-769">Source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T<div class="where">where
U: <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;,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#777">Source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -&gt; U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
<p>That is, this conversion is whatever the implementation of
<code><a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for U</code> chooses to do.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-IntoEither-for-T" class="impl"><a class="src rightside" href="https://docs.rs/either/1/src/either/into_either.rs.html#64">Source</a><a href="#impl-IntoEither-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://docs.rs/either/1/either/into_either/trait.IntoEither.html" title="trait either::into_either::IntoEither">IntoEither</a> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into_either" class="method trait-impl"><a class="src rightside" href="https://docs.rs/either/1/src/either/into_either.rs.html#29">Source</a><a href="#method.into_either" class="anchor">§</a><h4 class="code-header">fn <a href="https://docs.rs/either/1/either/into_either/trait.IntoEither.html#method.into_either" class="fn">into_either</a>(self, into_left: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -&gt; <a class="enum" href="https://docs.rs/either/1/either/enum.Either.html" title="enum either::Either">Either</a>&lt;Self, Self&gt;</h4></section></summary><div class='docblock'>Converts <code>self</code> into a <a href="https://docs.rs/either/1/either/enum.Either.html#variant.Left" title="variant either::Either::Left"><code>Left</code></a> variant of <a href="https://docs.rs/either/1/either/enum.Either.html" title="enum either::Either"><code>Either&lt;Self, Self&gt;</code></a>
if <code>into_left</code> is <code>true</code>.
Converts <code>self</code> into a <a href="https://docs.rs/either/1/either/enum.Either.html#variant.Right" title="variant either::Either::Right"><code>Right</code></a> variant of <a href="https://docs.rs/either/1/either/enum.Either.html" title="enum either::Either"><code>Either&lt;Self, Self&gt;</code></a>
otherwise. <a href="https://docs.rs/either/1/either/into_either/trait.IntoEither.html#method.into_either">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.into_either_with" class="method trait-impl"><a class="src rightside" href="https://docs.rs/either/1/src/either/into_either.rs.html#55-57">Source</a><a href="#method.into_either_with" class="anchor">§</a><h4 class="code-header">fn <a href="https://docs.rs/either/1/either/into_either/trait.IntoEither.html#method.into_either_with" class="fn">into_either_with</a>&lt;F&gt;(self, into_left: F) -&gt; <a class="enum" href="https://docs.rs/either/1/either/enum.Either.html" title="enum either::Either">Either</a>&lt;Self, Self&gt;<div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&amp;Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class='docblock'>Converts <code>self</code> into a <a href="https://docs.rs/either/1/either/enum.Either.html#variant.Left" title="variant either::Either::Left"><code>Left</code></a> variant of <a href="https://docs.rs/either/1/either/enum.Either.html" title="enum either::Either"><code>Either&lt;Self, Self&gt;</code></a>
if <code>into_left(&amp;self)</code> returns <code>true</code>.
Converts <code>self</code> into a <a href="https://docs.rs/either/1/either/enum.Either.html#variant.Right" title="variant either::Either::Right"><code>Right</code></a> variant of <a href="https://docs.rs/either/1/either/enum.Either.html" title="enum either::Either"><code>Either&lt;Self, Self&gt;</code></a>
otherwise. <a href="https://docs.rs/either/1/either/into_either/trait.IntoEither.html#method.into_either_with">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Same-for-T" class="impl"><a class="src rightside" href="https://docs.rs/typenum/1.19.0/src/typenum/type_operators.rs.html#34">Source</a><a href="#impl-Same-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://docs.rs/typenum/1.19.0/typenum/type_operators/trait.Same.html" title="trait typenum::type_operators::Same">Same</a> for T</h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output" class="associatedtype trait-impl"><a class="src rightside" href="https://docs.rs/typenum/1.19.0/src/typenum/type_operators.rs.html#35">Source</a><a href="#associatedtype.Output" class="anchor">§</a><h4 class="code-header">type <a href="https://docs.rs/typenum/1.19.0/typenum/type_operators/trait.Same.html#associatedtype.Output" class="associatedtype">Output</a> = T</h4></section></summary><div class='docblock'>Should always be <code>Self</code></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#827-829">Source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#831">Source</a><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#834">Source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#811-813">Source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#815">Source</a><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#818">Source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(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;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-WithSubscriber-for-T" class="impl"><a href="#impl-WithSubscriber-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; WithSubscriber for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.with_subscriber" class="method trait-impl"><a href="#method.with_subscriber" class="anchor">§</a><h4 class="code-header">fn <a class="fn">with_subscriber</a>&lt;S&gt;(self, subscriber: S) -&gt; WithDispatch&lt;Self&gt;<div class="where">where
S: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;Dispatch&gt;,</div></h4></section></summary><div class='docblock'>Attaches the provided <a href="super::Subscriber"><code>Subscriber</code></a> to this type, returning a
[<code>WithDispatch</code>] wrapper. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.with_current_subscriber" class="method trait-impl"><a href="#method.with_current_subscriber" class="anchor">§</a><h4 class="code-header">fn <a class="fn">with_current_subscriber</a>(self) -&gt; WithDispatch&lt;Self&gt;</h4></section></summary><div class='docblock'>Attaches the current <a href="crate::dispatcher#setting-the-default-subscriber">default</a> <a href="super::Subscriber"><code>Subscriber</code></a> to this type, returning a
[<code>WithDispatch</code>] wrapper. <a>Read more</a></div></details></div></details></div></section></div></main></body></html>