mirror of
https://github.com/n0-computer/noq.git
synced 2026-09-21 10:43:25 +00:00
214 lines
87 KiB
HTML
214 lines
87 KiB
HTML
<!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="A QUIC connection."><title>Connection in noq - 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" 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/index.html">noq</a><span class="version">1.0.0-rc.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.accept_bi" title="accept_bi">accept_bi</a></li><li><a href="#method.accept_uni" title="accept_uni">accept_uni</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_reason" title="close_reason">close_reason</a></li><li><a href="#method.closed" title="closed">closed</a></li><li><a href="#method.congestion_state" title="congestion_state">congestion_state</a></li><li><a href="#method.datagram_send_buffer_space" title="datagram_send_buffer_space">datagram_send_buffer_space</a></li><li><a href="#method.export_keying_material" title="export_keying_material">export_keying_material</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.handshake_confirmed" title="handshake_confirmed">handshake_confirmed</a></li><li><a href="#method.handshake_data" title="handshake_data">handshake_data</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_multipath_enabled" title="is_multipath_enabled">is_multipath_enabled</a></li><li><a href="#method.max_datagram_size" title="max_datagram_size">max_datagram_size</a></li><li><a href="#method.nat_traversal_updates" title="nat_traversal_updates">nat_traversal_updates</a></li><li><a href="#method.observed_external_addr" title="observed_external_addr">observed_external_addr</a></li><li><a href="#method.on_closed" title="on_closed">on_closed</a></li><li><a href="#method.open_bi" title="open_bi">open_bi</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.open_uni" title="open_uni">open_uni</a></li><li><a href="#method.path" title="path">path</a></li><li><a href="#method.path_events" title="path_events">path_events</a></li><li><a href="#method.path_stats" title="path_stats">path_stats</a></li><li><a href="#method.peer_identity" title="peer_identity">peer_identity</a></li><li><a href="#method.read_datagram" title="read_datagram">read_datagram</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_datagram" title="send_datagram">send_datagram</a></li><li><a href="#method.send_datagram_wait" title="send_datagram_wait">send_datagram_wait</a></li><li><a href="#method.set_max_concurrent_bi_streams" title="set_max_concurrent_bi_streams">set_max_concurrent_bi_streams</a></li><li><a href="#method.set_max_concurrent_uni_streams" title="set_max_concurrent_uni_streams">set_max_concurrent_uni_streams</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.stable_id" title="stable_id">stable_id</a></li><li><a href="#method.stats" title="stats">stats</a></li><li><a href="#method.weak_handle" title="weak_handle">weak_handle</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-Connection" title="Clone">Clone</a></li><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-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><li><a href="#impl-UnwindSafe-for-Connection" title="UnwindSafe">UnwindSafe</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<T>">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T" title="BorrowMut<T>">BorrowMut<T></a></li><li><a href="#impl-CloneToUninit-for-T" title="CloneToUninit">CloneToUninit</a></li><li><a href="#impl-From%3CT%3E-for-T" title="From<T>">From<T></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<U>">Into<U></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-ToOwned-for-T" title="ToOwned">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T" title="TryFrom<U>">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T" title="TryInto<U>">TryInto<U></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</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</a></div><h1>Struct <span class="struct">Connection</span> <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/connection.rs.html#311">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>A QUIC connection.</p>
|
||
<p>If all references to a connection (including every clone of the <code>Connection</code> handle, streams of
|
||
incoming streams, and the various stream types) have been dropped, then the connection will be
|
||
automatically closed with an <code>error_code</code> of 0 and an empty <code>reason</code>. You can also close the
|
||
connection explicitly by calling <a href="struct.Connection.html#method.close" title="method noq::Connection::close"><code>Connection::close()</code></a>.</p>
|
||
<p>Closing the connection immediately abandons efforts to deliver data to the peer. Upon
|
||
receiving CONNECTION_CLOSE the peer <em>may</em> drop any stream data not yet delivered to the
|
||
application. <a href="struct.Connection.html#method.close" title="method noq::Connection::close"><code>Connection::close()</code></a> describes in more detail how to gracefully close a
|
||
connection without losing application data.</p>
|
||
<p>May be cloned to obtain another handle to the same connection.</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/connection.rs.html#313-944">Source</a><a href="#impl-Connection" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.Connection.html" title="struct noq::Connection">Connection</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.weak_handle" class="method"><a class="src rightside" href="../src/noq/connection.rs.html#315-317">Source</a><h4 class="code-header">pub fn <a href="#method.weak_handle" class="fn">weak_handle</a>(&self) -> <a class="struct" href="struct.WeakConnectionHandle.html" title="struct noq::WeakConnectionHandle">WeakConnectionHandle</a></h4></section></summary><div class="docblock"><p>Returns a weak reference to the inner connection struct.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.open_uni" class="method"><a class="src rightside" href="../src/noq/connection.rs.html#324-329">Source</a><h4 class="code-header">pub fn <a href="#method.open_uni" class="fn">open_uni</a>(&self) -> <a class="struct" href="struct.OpenUni.html" title="struct noq::OpenUni">OpenUni</a><'_> <a href="#" class="tooltip" data-notable-ty="OpenUni<'_>">ⓘ</a></h4></section></summary><div class="docblock"><p>Initiate a new outgoing unidirectional stream.</p>
|
||
<p>Streams are cheap and instantaneous to open unless blocked by flow control. As a
|
||
consequence, the peer won’t be notified that a stream has been opened until the stream is
|
||
actually used.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.open_bi" class="method"><a class="src rightside" href="../src/noq/connection.rs.html#341-346">Source</a><h4 class="code-header">pub fn <a href="#method.open_bi" class="fn">open_bi</a>(&self) -> <a class="struct" href="struct.OpenBi.html" title="struct noq::OpenBi">OpenBi</a><'_> <a href="#" class="tooltip" data-notable-ty="OpenBi<'_>">ⓘ</a></h4></section></summary><div class="docblock"><p>Initiate a new outgoing bidirectional stream.</p>
|
||
<p>Streams are cheap and instantaneous to open unless blocked by flow control. As a
|
||
consequence, the peer won’t be notified that a stream has been opened until the stream is
|
||
actually used. Calling <a href="struct.Connection.html#method.open_bi" title="method noq::Connection::open_bi"><code>open_bi()</code></a> then waiting on the <a href="struct.RecvStream.html" title="struct noq::RecvStream"><code>RecvStream</code></a> without writing
|
||
anything to <a href="struct.SendStream.html" title="struct noq::SendStream"><code>SendStream</code></a> will never succeed.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.accept_uni" class="method"><a class="src rightside" href="../src/noq/connection.rs.html#349-354">Source</a><h4 class="code-header">pub fn <a href="#method.accept_uni" class="fn">accept_uni</a>(&self) -> <a class="struct" href="struct.AcceptUni.html" title="struct noq::AcceptUni">AcceptUni</a><'_> <a href="#" class="tooltip" data-notable-ty="AcceptUni<'_>">ⓘ</a></h4></section></summary><div class="docblock"><p>Accept the next incoming uni-directional stream</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.accept_bi" class="method"><a class="src rightside" href="../src/noq/connection.rs.html#366-371">Source</a><h4 class="code-header">pub fn <a href="#method.accept_bi" class="fn">accept_bi</a>(&self) -> <a class="struct" href="struct.AcceptBi.html" title="struct noq::AcceptBi">AcceptBi</a><'_> <a href="#" class="tooltip" data-notable-ty="AcceptBi<'_>">ⓘ</a></h4></section></summary><div class="docblock"><p>Accept the next incoming bidirectional stream</p>
|
||
<p><strong>Important Note</strong>: The <code>Connection</code> that calls <a href="struct.Connection.html#method.open_bi" title="method noq::Connection::open_bi"><code>open_bi()</code></a> must write to its <a href="struct.SendStream.html" title="struct noq::SendStream"><code>SendStream</code></a>
|
||
before the other <code>Connection</code> is able to <code>accept_bi()</code>. Calling <a href="struct.Connection.html#method.open_bi" title="method noq::Connection::open_bi"><code>open_bi()</code></a> then
|
||
waiting on the <a href="struct.RecvStream.html" title="struct noq::RecvStream"><code>RecvStream</code></a> without writing anything to <a href="struct.SendStream.html" title="struct noq::SendStream"><code>SendStream</code></a> will never succeed.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.read_datagram" class="method"><a class="src rightside" href="../src/noq/connection.rs.html#374-379">Source</a><h4 class="code-header">pub fn <a href="#method.read_datagram" class="fn">read_datagram</a>(&self) -> <a class="struct" href="struct.ReadDatagram.html" title="struct noq::ReadDatagram">ReadDatagram</a><'_> <a href="#" class="tooltip" data-notable-ty="ReadDatagram<'_>">ⓘ</a></h4></section></summary><div class="docblock"><p>Receive an application datagram</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/connection.rs.html#386-437">Source</a><h4 class="code-header">pub fn <a href="#method.open_path_ensure" class="fn">open_path_ensure</a>(
|
||
&self,
|
||
addr: <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>,
|
||
initial_status: <a class="enum" href="enum.PathStatus.html" title="enum noq::PathStatus">PathStatus</a>,
|
||
) -> <a class="struct" href="struct.OpenPath.html" title="struct noq::OpenPath">OpenPath</a> <a href="#" class="tooltip" data-notable-ty="OpenPath">ⓘ</a></h4></section></summary><div class="docblock"><p>Opens a new path if no path exists yet for the remote address.</p>
|
||
<p>Otherwise behaves exactly as <a href="struct.Connection.html#method.open_path" title="method noq::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/connection.rs.html#453-496">Source</a><h4 class="code-header">pub fn <a href="#method.open_path" class="fn">open_path</a>(
|
||
&self,
|
||
addr: <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>,
|
||
initial_status: <a class="enum" href="enum.PathStatus.html" title="enum noq::PathStatus">PathStatus</a>,
|
||
) -> <a class="struct" href="struct.OpenPath.html" title="struct noq::OpenPath">OpenPath</a> <a href="#" class="tooltip" data-notable-ty="OpenPath">ⓘ</a></h4></section></summary><div class="docblock"><p>Opens an additional path if the multipath extension is negotiated.</p>
|
||
<p>The returned future completes once the path is either fully opened and ready to
|
||
carry application data, or if there was an error.</p>
|
||
<p>Dropping the returned future does not cancel the opening of the path, the
|
||
<a href="enum.PathEvent.html#variant.Established" title="variant noq::PathEvent::Established"><code>PathEvent::Established</code></a> event will still be emitted from <a href="struct.Connection.html#method.path_events" title="method noq::Connection::path_events"><code>Self::path_events</code></a> if
|
||
the path opens. The <a href="struct.PathId.html" title="struct noq::PathId"><code>PathId</code></a> for the events can be extracted from
|
||
<a href="struct.OpenPath.html#method.path_id" title="method noq::OpenPath::path_id"><code>OpenPath::path_id</code></a>.</p>
|
||
<p>Failure to open a path can either occur immediately, before polling the returned
|
||
future, or at a later time. If the failure is immediate <a href="struct.OpenPath.html#method.path_id" title="method noq::OpenPath::path_id"><code>OpenPath::path_id</code></a> will
|
||
return <code>None</code> and the future will be ready immediately. If the failure happens
|
||
later, a <a href="enum.PathEvent.html" title="enum noq::PathEvent"><code>PathEvent</code></a> will be emitted.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.path" class="method"><a class="src rightside" href="../src/noq/connection.rs.html#499-501">Source</a><h4 class="code-header">pub fn <a href="#method.path" class="fn">path</a>(&self, id: <a class="struct" href="struct.PathId.html" title="struct noq::PathId">PathId</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.Path.html" title="struct noq::Path">Path</a>></h4></section></summary><div class="docblock"><p>Returns the <a href="struct.Path.html" title="struct noq::Path"><code>Path</code></a> structure of an open path</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.path_events" class="method"><a class="src rightside" href="../src/noq/connection.rs.html#510-517">Source</a><h4 class="code-header">pub fn <a href="#method.path_events" class="fn">path_events</a>(&self) -> <a class="struct" href="struct.PathEvents.html" title="struct noq::PathEvents">PathEvents</a></h4></section></summary><div class="docblock"><p>A stream of <a href="enum.PathEvent.html" title="enum noq::PathEvent"><code>PathEvent</code></a>s for all paths in this connection.</p>
|
||
<p>The stream will yield a <a href="enum.PathEvent.html" title="enum noq::PathEvent"><code>PathEvent</code></a> whenever there is a change in the state of any path in this connection.
|
||
The events need to be processed immediately, since there isn’t an unbounded buffer for them.</p>
|
||
<p>If processing of events lags behind too much, you will get an error of type <a href="struct.Lagged.html" title="struct noq::Lagged"><code>crate::Lagged</code></a> indicating
|
||
how many events were lost. The stream continues after a lag, delivering the oldest retained message next.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.nat_traversal_updates" class="method"><a class="src rightside" href="../src/noq/connection.rs.html#525-532">Source</a><h4 class="code-header">pub fn <a href="#method.nat_traversal_updates" class="fn">nat_traversal_updates</a>(&self) -> <a class="struct" href="struct.NatTraversalUpdates.html" title="struct noq::NatTraversalUpdates">NatTraversalUpdates</a></h4></section></summary><div class="docblock"><p>A stream of NAT traversal updates for this connection.</p>
|
||
<p>The events need to be processed immediately, since there isn’t an unbounded buffer for them.</p>
|
||
<p>If processing of events lags behind too much, you will get an error of type <a href="struct.Lagged.html" title="struct noq::Lagged"><code>crate::Lagged</code></a> indicating
|
||
how many events were lost. The stream continues after a lag, delivering the oldest retained message next.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.closed" class="method"><a class="src rightside" href="../src/noq/connection.rs.html#539-557">Source</a><h4 class="code-header">pub async fn <a href="#method.closed" class="fn">closed</a>(&self) -> <a class="enum" href="enum.ConnectionError.html" title="enum noq::ConnectionError">ConnectionError</a></h4></section></summary><div class="docblock"><p>Wait for the connection to be closed for any reason</p>
|
||
<p>Despite the return type’s name, closed connections are often not an error condition at the
|
||
application layer. Cases that might be routine include <a href="enum.ConnectionError.html#variant.LocallyClosed" title="variant noq::ConnectionError::LocallyClosed"><code>ConnectionError::LocallyClosed</code></a>
|
||
and <a href="enum.ConnectionError.html#variant.ApplicationClosed" title="variant noq::ConnectionError::ApplicationClosed"><code>ConnectionError::ApplicationClosed</code></a>.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.on_closed" class="method"><a class="src rightside" href="../src/noq/connection.rs.html#568-582">Source</a><h4 class="code-header">pub fn <a href="#method.on_closed" class="fn">on_closed</a>(&self) -> <a class="struct" href="struct.OnClosed.html" title="struct noq::OnClosed">OnClosed</a> <a href="#" class="tooltip" data-notable-ty="OnClosed">ⓘ</a></h4></section></summary><div class="docblock"><p>Wait for the connection to be closed without keeping a strong reference to the connection</p>
|
||
<p>Returns a future that resolves, once the connection is closed, to a <a href="struct.Closed.html" title="struct noq::Closed"><code>Closed</code></a> struct
|
||
describing the close reason and final connection and per-path statistics.</p>
|
||
<p>Calling <a href="struct.Connection.html#method.closed" title="method noq::Connection::closed"><code>Self::closed</code></a> keeps the connection alive until it is either closed locally via <a href="struct.Connection.html#method.close" title="method noq::Connection::close"><code>Connection::close</code></a>
|
||
or closed by the remote peer. This function instead does not keep the connection itself alive,
|
||
so if all <em>other</em> clones of the connection are dropped, the connection will be closed implicitly even
|
||
if there are futures returned from this function still being awaited.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.close_reason" class="method"><a class="src rightside" href="../src/noq/connection.rs.html#592-594">Source</a><h4 class="code-header">pub fn <a href="#method.close_reason" class="fn">close_reason</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="enum.ConnectionError.html" title="enum noq::ConnectionError">ConnectionError</a>></h4></section></summary><div class="docblock"><p>Whether the connection is closed, and why.</p>
|
||
<p>The close_reason is always set to <code>Some(ConnectionError)</code> when a socket is
|
||
closed; whether it was closed manually by calling <a href="struct.Connection.html#method.close" title="method noq::Connection::close"><code>Connection::close()</code></a> or due to
|
||
an internal error (such as an idle timeout or the peer closing the
|
||
connection).</p>
|
||
<p>Note: when the connection is closed, <code>connection.close_reason().is_some()</code> will always be true.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.close" class="method"><a class="src rightside" href="../src/noq/connection.rs.html#627-630">Source</a><h4 class="code-header">pub fn <a href="#method.close" class="fn">close</a>(&self, error_code: <a class="struct" href="struct.VarInt.html" title="struct noq::VarInt">VarInt</a>, reason: &[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>])</h4></section></summary><div class="docblock"><p>Close the connection immediately.</p>
|
||
<p>Pending operations will fail immediately with <a href="enum.ConnectionError.html#variant.LocallyClosed" title="variant noq::ConnectionError::LocallyClosed"><code>ConnectionError::LocallyClosed</code></a>. No
|
||
more data is sent to the peer and the peer may drop buffered data upon receiving
|
||
the CONNECTION_CLOSE frame.</p>
|
||
<p><code>error_code</code> and <code>reason</code> are not interpreted, and are provided directly to the peer.</p>
|
||
<p><code>reason</code> will be truncated to fit in a single packet with overhead; to improve odds that it
|
||
is preserved in full, it should be kept under 1KiB.</p>
|
||
<h5 id="gracefully-closing-a-connection"><a class="doc-anchor" href="#gracefully-closing-a-connection">§</a>Gracefully closing a connection</h5>
|
||
<p>Only the peer last receiving application data can be certain that all data is
|
||
delivered. The only reliable action it can then take is to close the connection,
|
||
potentially with a custom error code. The delivery of the final CONNECTION_CLOSE
|
||
frame is very likely if both endpoints stay online long enough, and
|
||
<a href="struct.Endpoint.html#method.wait_idle" title="method noq::Endpoint::wait_idle"><code>Endpoint::wait_idle()</code></a> can be used to provide sufficient time. Otherwise, the
|
||
remote peer will time out the connection, provided that the idle timeout is not
|
||
disabled.</p>
|
||
<p>The sending side can not guarantee all stream data is delivered to the remote
|
||
application. It only knows the data is delivered to the QUIC stack of the remote
|
||
endpoint. Once the local side sends a CONNECTION_CLOSE frame in response to calling
|
||
<a href="struct.Connection.html#method.close" title="method noq::Connection::close"><code>close()</code></a> the remote endpoint may drop any data it received but is as yet
|
||
undelivered to the application, including data that was acknowledged as received to
|
||
the local endpoint.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.handshake_confirmed" class="method"><a class="src rightside" href="../src/noq/connection.rs.html#642-667">Source</a><h4 class="code-header">pub async fn <a href="#method.handshake_confirmed" class="fn">handshake_confirmed</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="enum" href="enum.ConnectionError.html" title="enum noq::ConnectionError">ConnectionError</a>></h4></section></summary><div class="docblock"><p>Wait for the handshake to be confirmed.</p>
|
||
<p>As a server, who must be authenticated by clients,
|
||
this happens when the handshake completes
|
||
upon receiving a TLS Finished message from the client.
|
||
In return, the server send a HANDSHAKE_DONE frame.</p>
|
||
<p>As a client, this happens when receiving a HANDSHAKE_DONE frame.
|
||
At this point, the server has either accepted our authentication,
|
||
or, if client authentication is not required, accepted our lack of authentication.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.send_datagram" class="method"><a class="src rightside" href="../src/noq/connection.rs.html#677-692">Source</a><h4 class="code-header">pub fn <a href="#method.send_datagram" class="fn">send_datagram</a>(&self, data: Bytes) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="enum" href="enum.SendDatagramError.html" title="enum noq::SendDatagramError">SendDatagramError</a>></h4></section></summary><div class="docblock"><p>Transmit <code>data</code> as an unreliable, unordered application datagram</p>
|
||
<p>Application datagrams are a low-level primitive. They may be lost or delivered out of order,
|
||
and <code>data</code> must both fit inside a single QUIC packet and be smaller than the maximum
|
||
dictated by the peer.</p>
|
||
<p>Previously queued datagrams which are still unsent may be discarded to make space for this
|
||
datagram, in order of oldest to newest.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.send_datagram_wait" class="method"><a class="src rightside" href="../src/noq/connection.rs.html#702-708">Source</a><h4 class="code-header">pub fn <a href="#method.send_datagram_wait" class="fn">send_datagram_wait</a>(&self, data: Bytes) -> <a class="struct" href="struct.SendDatagram.html" title="struct noq::SendDatagram">SendDatagram</a><'_> <a href="#" class="tooltip" data-notable-ty="SendDatagram<'_>">ⓘ</a></h4></section></summary><div class="docblock"><p>Transmit <code>data</code> as an unreliable, unordered application datagram</p>
|
||
<p>Unlike <a href="struct.Connection.html#method.send_datagram" title="method noq::Connection::send_datagram"><code>send_datagram()</code></a>, this method will wait for buffer space during congestion
|
||
conditions, which effectively prioritizes old datagrams over new datagrams.</p>
|
||
<p>See <a href="struct.Connection.html#method.send_datagram" title="method noq::Connection::send_datagram"><code>send_datagram()</code></a> for details.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.max_datagram_size" class="method"><a class="src rightside" href="../src/noq/connection.rs.html#721-727">Source</a><h4 class="code-header">pub fn <a href="#method.max_datagram_size" class="fn">max_datagram_size</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>></h4></section></summary><div class="docblock"><p>Compute the maximum size of datagrams that may be passed to <a href="struct.Connection.html#method.send_datagram" title="method noq::Connection::send_datagram"><code>send_datagram()</code></a>.</p>
|
||
<p>Returns <code>None</code> if datagrams are unsupported by the peer or disabled locally.</p>
|
||
<p>This may change over the lifetime of a connection according to variation in the path MTU
|
||
estimate. The peer can also enforce an arbitrarily small fixed limit, but if the peer’s
|
||
limit is large this is guaranteed to be a little over a kilobyte at minimum.</p>
|
||
<p>Not necessarily the maximum size of received datagrams.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.datagram_send_buffer_space" class="method"><a class="src rightside" href="../src/noq/connection.rs.html#733-739">Source</a><h4 class="code-header">pub fn <a href="#method.datagram_send_buffer_space" class="fn">datagram_send_buffer_space</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Bytes available in the outgoing datagram buffer</p>
|
||
<p>When greater than zero, calling <a href="struct.Connection.html#method.send_datagram" title="method noq::Connection::send_datagram"><code>send_datagram()</code></a> with a datagram of
|
||
at most this size is guaranteed not to cause older datagrams to be dropped.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.side" class="method"><a class="src rightside" href="../src/noq/connection.rs.html#742-744">Source</a><h4 class="code-header">pub fn <a href="#method.side" class="fn">side</a>(&self) -> <a class="enum" href="enum.Side.html" title="enum noq::Side">Side</a></h4></section></summary><div class="docblock"><p>The side of the connection (client or server)</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.rtt" class="method"><a class="src rightside" href="../src/noq/connection.rs.html#747-749">Source</a><h4 class="code-header">pub fn <a href="#method.rtt" class="fn">rtt</a>(&self, path_id: <a class="struct" href="struct.PathId.html" title="struct noq::PathId">PathId</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/nightly/core/time/struct.Duration.html" title="struct core::time::Duration">Duration</a>></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.stats" class="method"><a class="src rightside" href="../src/noq/connection.rs.html#752-754">Source</a><h4 class="code-header">pub fn <a href="#method.stats" class="fn">stats</a>(&self) -> <a class="struct" href="struct.ConnectionStats.html" title="struct noq::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/connection.rs.html#757-759">Source</a><h4 class="code-header">pub fn <a href="#method.path_stats" class="fn">path_stats</a>(&self, path_id: <a class="struct" href="struct.PathId.html" title="struct noq::PathId">PathId</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.PathStats.html" title="struct noq::PathStats">PathStats</a>></h4></section></summary><div class="docblock"><p>Returns path statistics</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.congestion_state" class="method"><a class="src rightside" href="../src/noq/connection.rs.html#762-768">Source</a><h4 class="code-header">pub fn <a href="#method.congestion_state" class="fn">congestion_state</a>(&self, path_id: <a class="struct" href="struct.PathId.html" title="struct noq::PathId">PathId</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="congestion/trait.Controller.html" title="trait noq::congestion::Controller">Controller</a>>></h4></section></summary><div class="docblock"><p>Current state of the congestion control algorithm, for debugging purposes</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.handshake_data" class="method"><a class="src rightside" href="../src/noq/connection.rs.html#777-783">Source</a><h4 class="code-header">pub fn <a href="#method.handshake_data" class="fn">handshake_data</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a>>></h4></section></summary><div class="docblock"><p>Parameters negotiated during the handshake</p>
|
||
<p>Guaranteed to return <code>Some</code> on fully established connections or after
|
||
<a href="struct.Connecting.html#method.handshake_data" title="method noq::Connecting::handshake_data"><code>Connecting::handshake_data()</code></a> succeeds. See that method’s documentations for details on
|
||
the returned value.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.peer_identity" class="method"><a class="src rightside" href="../src/noq/connection.rs.html#790-796">Source</a><h4 class="code-header">pub fn <a href="#method.peer_identity" class="fn">peer_identity</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a>>></h4></section></summary><div class="docblock"><p>Cryptographic identity of the peer</p>
|
||
<p>The dynamic type returned is determined by the configured
|
||
<a href="crypto/trait.Session.html" title="trait noq::crypto::Session"><code>Session</code></a>. For the default <code>rustls</code> session, the return value can
|
||
be <a href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html#method.downcast" title="method alloc::boxed::Box::downcast"><code>downcast</code></a> to a <code>Vec<[rustls::pki_types::CertificateDer]></code></p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.stable_id" class="method"><a class="src rightside" href="../src/noq/connection.rs.html#802-804">Source</a><h4 class="code-header">pub fn <a href="#method.stable_id" class="fn">stable_id</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>A stable identifier for this connection</p>
|
||
<p>Peer addresses and connection IDs can change, but this value will remain
|
||
fixed for the lifetime of the connection.</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/connection.rs.html#809-814">Source</a><h4 class="code-header">pub fn <a href="#method.force_key_update" class="fn">force_key_update</a>(&self)</h4></section></summary><div class="docblock"><p>Update traffic keys spontaneously</p>
|
||
<p>This primarily exists for testing purposes.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.export_keying_material" class="method"><a class="src rightside" href="../src/noq/connection.rs.html#824-835">Source</a><h4 class="code-header">pub fn <a href="#method.export_keying_material" class="fn">export_keying_material</a>(
|
||
&self,
|
||
output: &mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>],
|
||
label: &[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>],
|
||
context: &[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>],
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="crypto/struct.ExportKeyingMaterialError.html" title="struct noq::crypto::ExportKeyingMaterialError">ExportKeyingMaterialError</a>></h4></section></summary><div class="docblock"><p>Derive keying material from this connection’s TLS session secrets.</p>
|
||
<p>When both peers call this method with the same <code>label</code> and <code>context</code>
|
||
arguments and <code>output</code> buffers of equal length, they will get the
|
||
same sequence of bytes in <code>output</code>. These bytes are cryptographically
|
||
strong and pseudorandom, and are suitable for use as keying material.</p>
|
||
<p>See <a href="https://tools.ietf.org/html/rfc5705">RFC5705</a> for more information.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_max_concurrent_uni_streams" class="method"><a class="src rightside" href="../src/noq/connection.rs.html#841-844">Source</a><h4 class="code-header">pub fn <a href="#method.set_max_concurrent_uni_streams" class="fn">set_max_concurrent_uni_streams</a>(&self, count: <a class="struct" href="struct.VarInt.html" title="struct noq::VarInt">VarInt</a>)</h4></section></summary><div class="docblock"><p>Modify the number of remotely initiated unidirectional 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_send_window" class="method"><a class="src rightside" href="../src/noq/connection.rs.html#847-850">Source</a><h4 class="code-header">pub fn <a href="#method.set_send_window" class="fn">set_send_window</a>(&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::TransportConfig::send_window"><code>proto::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/connection.rs.html#853-856">Source</a><h4 class="code-header">pub fn <a href="#method.set_receive_window" class="fn">set_receive_window</a>(&self, receive_window: <a class="struct" href="struct.VarInt.html" title="struct noq::VarInt">VarInt</a>)</h4></section></summary><div class="docblock"><p>See <a href="struct.TransportConfig.html#method.receive_window" title="method noq::TransportConfig::receive_window"><code>proto::TransportConfig::receive_window()</code></a></p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_max_concurrent_bi_streams" class="method"><a class="src rightside" href="../src/noq/connection.rs.html#862-865">Source</a><h4 class="code-header">pub fn <a href="#method.set_max_concurrent_bi_streams" class="fn">set_max_concurrent_bi_streams</a>(&self, count: <a class="struct" href="struct.VarInt.html" title="struct noq::VarInt">VarInt</a>)</h4></section></summary><div class="docblock"><p>Modify the number of remotely initiated bidirectional 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.observed_external_addr" class="method"><a class="src rightside" href="../src/noq/connection.rs.html#868-871">Source</a><h4 class="code-header">pub fn <a href="#method.observed_external_addr" class="fn">observed_external_addr</a>(&self) -> <a class="struct" href="struct.ObservedExternalAddr.html" title="struct noq::ObservedExternalAddr">ObservedExternalAddr</a></h4></section></summary><div class="docblock"><p>Track changes on our external address as reported by the peer.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_multipath_enabled" class="method"><a class="src rightside" href="../src/noq/connection.rs.html#876-879">Source</a><h4 class="code-header">pub fn <a href="#method.is_multipath_enabled" class="fn">is_multipath_enabled</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Is multipath enabled?</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/connection.rs.html#887-893">Source</a><h4 class="code-header">pub fn <a href="#method.add_nat_traversal_address" class="fn">add_nat_traversal_address</a>(
|
||
&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>,
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="enum" href="../noq_proto/n0_nat_traversal/enum.Error.html" title="enum noq_proto::n0_nat_traversal::Error">Error</a>></h4></section></summary><div class="docblock"><p>Registers one address at which this endpoint might be reachable</p>
|
||
<p>When the NAT traversal extension is negotiated, servers send these addresses to clients in
|
||
<code>ADD_ADDRESS</code> frames. This allows clients to obtain server address candidates to initiate
|
||
NAT traversal attempts. Clients provide their own reachable addresses in <code>REACH_OUT</code> frames
|
||
when <a href="struct.Connection.html#method.initiate_nat_traversal_round" title="method noq::Connection::initiate_nat_traversal_round"><code>Self::initiate_nat_traversal_round</code></a> is called.</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/connection.rs.html#904-910">Source</a><h4 class="code-header">pub fn <a href="#method.remove_nat_traversal_address" class="fn">remove_nat_traversal_address</a>(
|
||
&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>,
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="enum" href="../noq_proto/n0_nat_traversal/enum.Error.html" title="enum noq_proto::n0_nat_traversal::Error">Error</a>></h4></section></summary><div class="docblock"><p>Removes one or more addresses from the set of addresses at which this endpoint is reachable</p>
|
||
<p>When the NAT traversal extension is negotiated, servers send address removals to
|
||
clients in <code>REMOVE_ADDRESS</code> frames. This allows clients to stop using outdated
|
||
server address candidates that are no longer valid for NAT traversal.</p>
|
||
<p>For clients, removed addresses will no longer be advertised in <code>REACH_OUT</code> frames.</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/connection.rs.html#913-920">Source</a><h4 class="code-header">pub fn <a href="#method.get_local_nat_traversal_addresses" class="fn">get_local_nat_traversal_addresses</a>(
|
||
&self,
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<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>>, <a class="enum" href="../noq_proto/n0_nat_traversal/enum.Error.html" title="enum noq_proto::n0_nat_traversal::Error">Error</a>></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/connection.rs.html#923-930">Source</a><h4 class="code-header">pub fn <a href="#method.get_remote_nat_traversal_addresses" class="fn">get_remote_nat_traversal_addresses</a>(
|
||
&self,
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<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>>, <a class="enum" href="../noq_proto/n0_nat_traversal/enum.Error.html" title="enum noq_proto::n0_nat_traversal::Error">Error</a>></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/connection.rs.html#939-943">Source</a><h4 class="code-header">pub fn <a href="#method.initiate_nat_traversal_round" class="fn">initiate_nat_traversal_round</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<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>>, <a class="enum" href="../noq_proto/n0_nat_traversal/enum.Error.html" title="enum noq_proto::n0_nat_traversal::Error">Error</a>></h4></section></summary><div class="docblock"><p>Initiates a new nat traversal round</p>
|
||
<p>A nat traversal round involves advertising the client’s 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, and paths that have not been opened are closed.</p>
|
||
<p>Returns the server addresses that are now being probed.</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-Clone-for-Connection" class="impl"><a class="src rightside" href="../src/noq/connection.rs.html#310">Source</a><a href="#impl-Clone-for-Connection" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.Connection.html" title="struct noq::Connection">Connection</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../src/noq/connection.rs.html#310">Source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="struct" href="struct.Connection.html" title="struct noq::Connection">Connection</a></h4></section></summary><div class='docblock'>Returns a duplicate of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#245-247">Source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: &Self)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-Connection" class="impl"><a class="src rightside" href="../src/noq/connection.rs.html#310">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::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/connection.rs.html#310">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>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <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::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::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::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::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::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::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<T> <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>(&self) -> <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<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> 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>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&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<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> 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>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&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-CloneToUninit-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#515">Source</a><a href="#impl-CloneToUninit-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.CloneToUninit.html" title="trait core::clone::CloneToUninit">CloneToUninit</a> for T<div class="where">where
|
||
T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone_to_uninit" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#517">Source</a><a href="#method.clone_to_uninit" class="anchor">§</a><h4 class="code-header">unsafe fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.CloneToUninit.html#tymethod.clone_to_uninit" class="fn">clone_to_uninit</a>(&self, dest: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*mut </a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>)</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>clone_to_uninit</code>)</span></div></span><div class='docblock'>Performs copy-assignment from <code>self</code> to <code>dest</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.CloneToUninit.html#tymethod.clone_to_uninit">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<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> 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) -> 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<T> 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) -> Instrumented<Self></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) -> Instrumented<Self></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<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> 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><T>,</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) -> 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><T> 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<T> <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>) -> <a class="enum" href="https://docs.rs/either/1/either/enum.Either.html" title="enum either::Either">Either</a><Self, Self></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<Self, Self></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<Self, Self></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><F>(self, into_left: F) -> <a class="enum" href="https://docs.rs/either/1/either/enum.Either.html" title="enum either::Either">Either</a><Self, Self><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>(&Self) -> <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<Self, Self></code></a>
|
||
if <code>into_left(&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<Self, Self></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<T> <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-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#84-86">Source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where
|
||
T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#88">Source</a><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#89">Source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#93">Source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></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<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> 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><T>,</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) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<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'>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<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> 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><T>,</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> = <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<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) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<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'>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<T> 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><S>(self, subscriber: S) -> WithDispatch<Self><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><Dispatch>,</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) -> WithDispatch<Self></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><script type="text/json" id="notable-traits-data">{"AcceptBi<'_>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.AcceptBi.html\" title=\"struct noq::AcceptBi\">AcceptBi</a><'_></code></h3><pre><code><div class=\"where\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html\" title=\"trait core::future::future::Future\">Future</a> for <a class=\"struct\" href=\"struct.AcceptBi.html\" title=\"struct noq::AcceptBi\">AcceptBi</a><'_></div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output\" class=\"associatedtype\">Output</a> = <a class=\"enum\" href=\"https://doc.rust-lang.org/nightly/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><(<a class=\"struct\" href=\"struct.SendStream.html\" title=\"struct noq::SendStream\">SendStream</a>, <a class=\"struct\" href=\"struct.RecvStream.html\" title=\"struct noq::RecvStream\">RecvStream</a>), <a class=\"enum\" href=\"enum.ConnectionError.html\" title=\"enum noq::ConnectionError\">ConnectionError</a>>;</div>","AcceptUni<'_>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.AcceptUni.html\" title=\"struct noq::AcceptUni\">AcceptUni</a><'_></code></h3><pre><code><div class=\"where\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html\" title=\"trait core::future::future::Future\">Future</a> for <a class=\"struct\" href=\"struct.AcceptUni.html\" title=\"struct noq::AcceptUni\">AcceptUni</a><'_></div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output\" class=\"associatedtype\">Output</a> = <a class=\"enum\" href=\"https://doc.rust-lang.org/nightly/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><<a class=\"struct\" href=\"struct.RecvStream.html\" title=\"struct noq::RecvStream\">RecvStream</a>, <a class=\"enum\" href=\"enum.ConnectionError.html\" title=\"enum noq::ConnectionError\">ConnectionError</a>>;</div>","OnClosed":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.OnClosed.html\" title=\"struct noq::OnClosed\">OnClosed</a></code></h3><pre><code><div class=\"where\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html\" title=\"trait core::future::future::Future\">Future</a> for <a class=\"struct\" href=\"struct.OnClosed.html\" title=\"struct noq::OnClosed\">OnClosed</a></div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output\" class=\"associatedtype\">Output</a> = <a class=\"struct\" href=\"struct.Closed.html\" title=\"struct noq::Closed\">Closed</a>;</div>","OpenBi<'_>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.OpenBi.html\" title=\"struct noq::OpenBi\">OpenBi</a><'_></code></h3><pre><code><div class=\"where\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html\" title=\"trait core::future::future::Future\">Future</a> for <a class=\"struct\" href=\"struct.OpenBi.html\" title=\"struct noq::OpenBi\">OpenBi</a><'_></div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output\" class=\"associatedtype\">Output</a> = <a class=\"enum\" href=\"https://doc.rust-lang.org/nightly/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><(<a class=\"struct\" href=\"struct.SendStream.html\" title=\"struct noq::SendStream\">SendStream</a>, <a class=\"struct\" href=\"struct.RecvStream.html\" title=\"struct noq::RecvStream\">RecvStream</a>), <a class=\"enum\" href=\"enum.ConnectionError.html\" title=\"enum noq::ConnectionError\">ConnectionError</a>>;</div>","OpenPath":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.OpenPath.html\" title=\"struct noq::OpenPath\">OpenPath</a></code></h3><pre><code><div class=\"where\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html\" title=\"trait core::future::future::Future\">Future</a> for <a class=\"struct\" href=\"struct.OpenPath.html\" title=\"struct noq::OpenPath\">OpenPath</a></div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output\" class=\"associatedtype\">Output</a> = <a class=\"enum\" href=\"https://doc.rust-lang.org/nightly/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><<a class=\"struct\" href=\"struct.Path.html\" title=\"struct noq::Path\">Path</a>, <a class=\"enum\" href=\"enum.PathError.html\" title=\"enum noq::PathError\">PathError</a>>;</div>","OpenUni<'_>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.OpenUni.html\" title=\"struct noq::OpenUni\">OpenUni</a><'_></code></h3><pre><code><div class=\"where\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html\" title=\"trait core::future::future::Future\">Future</a> for <a class=\"struct\" href=\"struct.OpenUni.html\" title=\"struct noq::OpenUni\">OpenUni</a><'_></div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output\" class=\"associatedtype\">Output</a> = <a class=\"enum\" href=\"https://doc.rust-lang.org/nightly/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><<a class=\"struct\" href=\"struct.SendStream.html\" title=\"struct noq::SendStream\">SendStream</a>, <a class=\"enum\" href=\"enum.ConnectionError.html\" title=\"enum noq::ConnectionError\">ConnectionError</a>>;</div>","ReadDatagram<'_>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.ReadDatagram.html\" title=\"struct noq::ReadDatagram\">ReadDatagram</a><'_></code></h3><pre><code><div class=\"where\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html\" title=\"trait core::future::future::Future\">Future</a> for <a class=\"struct\" href=\"struct.ReadDatagram.html\" title=\"struct noq::ReadDatagram\">ReadDatagram</a><'_></div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output\" class=\"associatedtype\">Output</a> = <a class=\"enum\" href=\"https://doc.rust-lang.org/nightly/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><Bytes, <a class=\"enum\" href=\"enum.ConnectionError.html\" title=\"enum noq::ConnectionError\">ConnectionError</a>>;</div>","SendDatagram<'_>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.SendDatagram.html\" title=\"struct noq::SendDatagram\">SendDatagram</a><'_></code></h3><pre><code><div class=\"where\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html\" title=\"trait core::future::future::Future\">Future</a> for <a class=\"struct\" href=\"struct.SendDatagram.html\" title=\"struct noq::SendDatagram\">SendDatagram</a><'_></div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output\" class=\"associatedtype\">Output</a> = <a class=\"enum\" href=\"https://doc.rust-lang.org/nightly/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.unit.html\">()</a>, <a class=\"enum\" href=\"enum.SendDatagramError.html\" title=\"enum noq::SendDatagramError\">SendDatagramError</a>>;</div>"}</script></section></div></main></body></html> |