mirror of
https://github.com/n0-computer/iroh.git
synced 2026-11-30 16:03:05 +00:00
142 lines
69 KiB
HTML
142 lines
69 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 iroh::endpoint - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-dbdb5eec.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh" data-themes="" data-resource-suffix="" data-rustdoc-version="1.85.0-nightly (d10a6823f 2024-11-29)" data-channel="nightly" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.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]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh/index.html">iroh</a><span class="version">0.30.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.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.handshake_data" title="handshake_data">handshake_data</a></li><li><a href="#method.local_ip" title="local_ip">local_ip</a></li><li><a href="#method.max_datagram_size" title="max_datagram_size">max_datagram_size</a></li><li><a href="#method.observed_external_addr" title="observed_external_addr">observed_external_addr</a></li><li><a href="#method.open_bi" title="open_bi">open_bi</a></li><li><a href="#method.open_uni" title="open_uni">open_uni</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.remote_address" title="remote_address">remote_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.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-AsTaggedExplicit%3C'a,+E%3E-for-T" title="AsTaggedExplicit<'a, E>">AsTaggedExplicit<'a, E></a></li><li><a href="#impl-AsTaggedImplicit%3C'a,+E%3E-for-T" title="AsTaggedImplicit<'a, E>">AsTaggedImplicit<'a, E></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-DynClone-for-T" title="DynClone">DynClone</a></li><li><a href="#impl-ErasedDestructor-for-T" title="ErasedDestructor">ErasedDestructor</a></li><li><a href="#impl-From%3CT%3E-for-T" title="From<T>">From<T></a></li><li><a href="#impl-FromRef%3CT%3E-for-T" title="FromRef<T>">FromRef<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-MaybeSendSync-for-T" title="MaybeSendSync">MaybeSendSync</a></li><li><a href="#impl-Pointable-for-T" title="Pointable">Pointable</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-VZip%3CV%3E-for-T" title="VZip<V>">VZip<V></a></li><li><a href="#impl-WithSubscriber-for-T" title="WithSubscriber">WithSubscriber</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In iroh::<wbr>endpoint</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">iroh</a>::<wbr><a href="index.html">endpoint</a></span><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"></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 iroh::endpoint::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 iroh::endpoint::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 href="#impl-Connection" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.Connection.html" title="struct iroh::endpoint::Connection">Connection</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.weak_handle" class="method"><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 iroh::endpoint::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"><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 iroh::endpoint::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"><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 iroh::endpoint::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 iroh::endpoint::Connection::open_bi"><code>open_bi()</code></a> then waiting on the <a href="struct.RecvStream.html" title="struct iroh::endpoint::RecvStream"><code>RecvStream</code></a> without writing
|
||
anything to <a href="struct.SendStream.html" title="struct iroh::endpoint::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"><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 iroh::endpoint::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"><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 iroh::endpoint::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 iroh::endpoint::Connection::open_bi"><code>open_bi()</code></a> must write to its <a href="struct.SendStream.html" title="struct iroh::endpoint::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 iroh::endpoint::Connection::open_bi"><code>open_bi()</code></a> then
|
||
waiting on the <a href="struct.RecvStream.html" title="struct iroh::endpoint::RecvStream"><code>RecvStream</code></a> without writing anything to <a href="struct.SendStream.html" title="struct iroh::endpoint::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"><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 iroh::endpoint::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.closed" class="method"><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 iroh::endpoint::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 iroh::endpoint::ConnectionError::LocallyClosed"><code>ConnectionError::LocallyClosed</code></a>
|
||
and <a href="enum.ConnectionError.html#variant.ApplicationClosed" title="variant iroh::endpoint::ConnectionError::ApplicationClosed"><code>ConnectionError::ApplicationClosed</code></a>.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.close_reason" class="method"><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 iroh::endpoint::ConnectionError">ConnectionError</a>></h4></section></summary><div class="docblock"><p>If the connection is closed, the reason why.</p>
|
||
<p>Returns <code>None</code> if the connection is still open.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.close" class="method"><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 iroh::endpoint::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 iroh::endpoint::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="crate::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 iroh::endpoint::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.send_datagram" class="method"><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 iroh::endpoint::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>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.send_datagram_wait" class="method"><h4 class="code-header">pub fn <a href="#method.send_datagram_wait" class="fn">send_datagram_wait</a>(&self, data: Bytes) -> SendDatagram<'_></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 iroh::endpoint::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 iroh::endpoint::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"><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 iroh::endpoint::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"><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 iroh::endpoint::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.remote_address" class="method"><h4 class="code-header">pub fn <a href="#method.remote_address" class="fn">remote_address</a>(&self) -> <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></h4></section></summary><div class="docblock"><p>The peer’s UDP address</p>
|
||
<p>If <code>ServerConfig::migration</code> is <code>true</code>, clients may change addresses at will, e.g. when
|
||
switching to a cellular internet connection.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.local_ip" class="method"><h4 class="code-header">pub fn <a href="#method.local_ip" class="fn">local_ip</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="https://doc.rust-lang.org/nightly/core/net/ip_addr/enum.IpAddr.html" title="enum core::net::ip_addr::IpAddr">IpAddr</a>></h4></section></summary><div class="docblock"><p>The local IP address which was used when the peer established
|
||
the connection</p>
|
||
<p>This can be different from the address the endpoint is bound to, in case
|
||
the endpoint is bound to a wildcard address like <code>0.0.0.0</code> or <code>::</code>.</p>
|
||
<p>This will return <code>None</code> for clients, or when the platform does not expose this
|
||
information. See <a href="udp::RecvMeta::dst_ip"><code>quinn_udp::RecvMeta::dst_ip</code></a> for a list of
|
||
supported platforms when using <a href="udp"><code>quinn_udp</code></a> for I/O, which is the default.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.rtt" class="method"><h4 class="code-header">pub fn <a href="#method.rtt" class="fn">rtt</a>(&self) -> <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"><h4 class="code-header">pub fn <a href="#method.stats" class="fn">stats</a>(&self) -> <a class="struct" href="struct.ConnectionStats.html" title="struct iroh::endpoint::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.congestion_state" class="method"><h4 class="code-header">pub fn <a href="#method.congestion_state" class="fn">congestion_state</a>(&self) -> <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="trait.Controller.html" title="trait iroh::endpoint::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"><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
|
||
[<code>Connecting::handshake_data()</code>] 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"><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="proto::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"><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.export_keying_material" class="method"><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="struct.ExportKeyingMaterialError.html" title="struct iroh::endpoint::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"><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 iroh::endpoint::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_receive_window" class="method"><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 iroh::endpoint::VarInt">VarInt</a>)</h4></section></summary><div class="docblock"><p>See <a href="struct.TransportConfig.html#method.receive_window" title="method iroh::endpoint::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"><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 iroh::endpoint::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"><h4 class="code-header">pub fn <a href="#method.observed_external_addr" class="fn">observed_external_addr</a>(&self) -> Receiver<<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="https://doc.rust-lang.org/nightly/core/net/socket_addr/enum.SocketAddr.html" title="enum core::net::socket_addr::SocketAddr">SocketAddr</a>>></h4></section></summary><div class="docblock"><p>Track changed on our external address as reported by the peer.</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 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 iroh::endpoint::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 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 iroh::endpoint::Connection">Connection</a></h4></section></summary><div class='docblock'>Returns a copy 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#174">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 href="#impl-Debug-for-Connection" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Connection.html" title="struct iroh::endpoint::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 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="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="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-Freeze-for-Connection" class="impl"><a href="#impl-Freeze-for-Connection" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.Connection.html" title="struct iroh::endpoint::Connection">Connection</a></h3></section><section id="impl-RefUnwindSafe-for-Connection" class="impl"><a href="#impl-RefUnwindSafe-for-Connection" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Connection.html" title="struct iroh::endpoint::Connection">Connection</a></h3></section><section id="impl-Send-for-Connection" class="impl"><a href="#impl-Send-for-Connection" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Connection.html" title="struct iroh::endpoint::Connection">Connection</a></h3></section><section id="impl-Sync-for-Connection" class="impl"><a href="#impl-Sync-for-Connection" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Connection.html" title="struct iroh::endpoint::Connection">Connection</a></h3></section><section id="impl-Unpin-for-Connection" class="impl"><a href="#impl-Unpin-for-Connection" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Connection.html" title="struct iroh::endpoint::Connection">Connection</a></h3></section><section id="impl-UnwindSafe-for-Connection" class="impl"><a href="#impl-UnwindSafe-for-Connection" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Connection.html" title="struct iroh::endpoint::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-AsTaggedExplicit%3C'a,+E%3E-for-T" class="impl"><a href="#impl-AsTaggedExplicit%3C'a,+E%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<'a, T, E> AsTaggedExplicit<'a, E> for T<div class="where">where
|
||
T: 'a,</div></h3></section></summary><div class="impl-items"><section id="method.explicit" class="method trait-impl"><a href="#method.explicit" class="anchor">§</a><h4 class="code-header">fn <a class="fn">explicit</a>(self, class: Class, tag: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -> TaggedParser<'a, Explicit, Self, E></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-AsTaggedImplicit%3C'a,+E%3E-for-T" class="impl"><a href="#impl-AsTaggedImplicit%3C'a,+E%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<'a, T, E> AsTaggedImplicit<'a, E> for T<div class="where">where
|
||
T: 'a,</div></h3></section></summary><div class="impl-items"><section id="method.implicit" class="method trait-impl"><a href="#method.implicit" class="anchor">§</a><h4 class="code-header">fn <a class="fn">implicit</a>(
|
||
self,
|
||
class: Class,
|
||
constructed: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,
|
||
tag: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>,
|
||
) -> TaggedParser<'a, Implicit, Self, E></h4></section></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#209">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#211">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#217">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#218">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#273">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#275">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, dst: <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>dst</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-DynClone-for-T" class="impl"><a class="src rightside" href="https://docs.rs/dyn-clone/1.0.17/src/dyn_clone/lib.rs.html#193-195">Source</a><a href="#impl-DynClone-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://docs.rs/dyn-clone/1.0.17/dyn_clone/trait.DynClone.html" title="trait dyn_clone::DynClone">DynClone</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"><section id="method.__clone_box" class="method trait-impl"><a class="src rightside" href="https://docs.rs/dyn-clone/1.0.17/src/dyn_clone/lib.rs.html#197">Source</a><a href="#method.__clone_box" class="anchor">§</a><h4 class="code-header">fn <a href="https://docs.rs/dyn-clone/1.0.17/dyn_clone/trait.DynClone.html#tymethod.__clone_box" class="fn">__clone_box</a>(&self, _: Private) -> <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.unit.html">()</a></h4></section></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#765">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#768">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-FromRef%3CT%3E-for-T" class="impl"><a href="#impl-FromRef%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> FromRef<T> 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.from_ref" class="method trait-impl"><a href="#method.from_ref" class="anchor">§</a><h4 class="code-header">fn <a class="fn">from_ref</a>(input: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&T</a>) -> T</h4></section></summary><div class='docblock'>Converts to this type from a reference to the input type.</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#748-750">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#758">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-Pointable-for-T" class="impl"><a href="#impl-Pointable-for-T" class="anchor">§</a><h3 class="code-header">impl<T> Pointable for T</h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedconstant.ALIGN" class="associatedconstant trait-impl"><a href="#associatedconstant.ALIGN" class="anchor">§</a><h4 class="code-header">const <a class="constant">ALIGN</a>: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a> = _</h4></section></summary><div class='docblock'>The alignment of pointer.</div></details><details class="toggle" open><summary><section id="associatedtype.Init" class="associatedtype trait-impl"><a href="#associatedtype.Init" class="anchor">§</a><h4 class="code-header">type <a class="associatedtype">Init</a> = T</h4></section></summary><div class='docblock'>The type for initializers.</div></details><details class="toggle method-toggle" open><summary><section id="method.init" class="method trait-impl"><a href="#method.init" class="anchor">§</a><h4 class="code-header">unsafe fn <a class="fn">init</a>(init: <T as Pointable>::Init) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class='docblock'>Initializes a with the given initializer. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.deref" class="method trait-impl"><a href="#method.deref" class="anchor">§</a><h4 class="code-header">unsafe fn <a class="fn">deref</a><'a>(ptr: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'a T</a></h4></section></summary><div class='docblock'>Dereferences the given pointer. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.deref_mut" class="method trait-impl"><a href="#method.deref_mut" class="anchor">§</a><h4 class="code-header">unsafe fn <a class="fn">deref_mut</a><'a>(ptr: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'a mut T</a></h4></section></summary><div class='docblock'>Mutably dereferences the given pointer. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.drop" class="method trait-impl"><a href="#method.drop" class="anchor">§</a><h4 class="code-header">unsafe fn <a class="fn">drop</a>(ptr: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class='docblock'>Drops the object pointed to by the given pointer. <a>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.17.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.17.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.17.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.17.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#82-84">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#86">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#87">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#91">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#805-807">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#809">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#812">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#790-792">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#794">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#797">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-VZip%3CV%3E-for-T" class="impl"><a href="#impl-VZip%3CV%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<V, T> VZip<V> for T<div class="where">where
|
||
V: MultiLane<T>,</div></h3></section></summary><div class="impl-items"><section id="method.vzip" class="method trait-impl"><a href="#method.vzip" class="anchor">§</a><h4 class="code-header">fn <a class="fn">vzip</a>(self) -> V</h4></section></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><section id="impl-ErasedDestructor-for-T" class="impl"><a href="#impl-ErasedDestructor-for-T" class="anchor">§</a><h3 class="code-header">impl<T> ErasedDestructor for T<div class="where">where
|
||
T: 'static,</div></h3></section><section id="impl-MaybeSendSync-for-T" class="impl"><a href="#impl-MaybeSendSync-for-T" class="anchor">§</a><h3 class="code-header">impl<T> MaybeSendSync for T</h3></section></div><script type="text/json" id="notable-traits-data">{"AcceptBi<'_>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.AcceptBi.html\" title=\"struct iroh::endpoint::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 iroh::endpoint::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 iroh::endpoint::SendStream\">SendStream</a>, <a class=\"struct\" href=\"struct.RecvStream.html\" title=\"struct iroh::endpoint::RecvStream\">RecvStream</a>), <a class=\"enum\" href=\"enum.ConnectionError.html\" title=\"enum iroh::endpoint::ConnectionError\">ConnectionError</a>>;</div>","AcceptUni<'_>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.AcceptUni.html\" title=\"struct iroh::endpoint::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 iroh::endpoint::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 iroh::endpoint::RecvStream\">RecvStream</a>, <a class=\"enum\" href=\"enum.ConnectionError.html\" title=\"enum iroh::endpoint::ConnectionError\">ConnectionError</a>>;</div>","OpenBi<'_>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.OpenBi.html\" title=\"struct iroh::endpoint::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 iroh::endpoint::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 iroh::endpoint::SendStream\">SendStream</a>, <a class=\"struct\" href=\"struct.RecvStream.html\" title=\"struct iroh::endpoint::RecvStream\">RecvStream</a>), <a class=\"enum\" href=\"enum.ConnectionError.html\" title=\"enum iroh::endpoint::ConnectionError\">ConnectionError</a>>;</div>","OpenUni<'_>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.OpenUni.html\" title=\"struct iroh::endpoint::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 iroh::endpoint::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 iroh::endpoint::SendStream\">SendStream</a>, <a class=\"enum\" href=\"enum.ConnectionError.html\" title=\"enum iroh::endpoint::ConnectionError\">ConnectionError</a>>;</div>","ReadDatagram<'_>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.ReadDatagram.html\" title=\"struct iroh::endpoint::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 iroh::endpoint::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 iroh::endpoint::ConnectionError\">ConnectionError</a>>;</div>"}</script></section></div></main></body></html> |