|
1 | 1 | <!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="The messages received from a framed relay stream."><title>ReceivedMessage in iroh_relay::client - 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_relay" 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 enum"><!--[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_relay/index.html">iroh_<wbr>relay</a><span class="version">0.30.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Received<wbr>Message</a></h2><h3><a href="#variants">Variants</a></h3><ul class="block variant"><li><a href="#variant.Health" title="Health">Health</a></li><li><a href="#variant.KeepAlive" title="KeepAlive">KeepAlive</a></li><li><a href="#variant.NodeGone" title="NodeGone">NodeGone</a></li><li><a href="#variant.Ping" title="Ping">Ping</a></li><li><a href="#variant.Pong" title="Pong">Pong</a></li><li><a href="#variant.ReceivedPacket" title="ReceivedPacket">ReceivedPacket</a></li><li><a href="#variant.ServerRestarting" title="ServerRestarting">ServerRestarting</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-ReceivedMessage" title="Clone">Clone</a></li><li><a href="#impl-Debug-for-ReceivedMessage" 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-ReceivedMessage" title="!Freeze">!Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-ReceivedMessage" title="RefUnwindSafe">RefUnwindSafe</a></li><li><a href="#impl-Send-for-ReceivedMessage" title="Send">Send</a></li><li><a href="#impl-Sync-for-ReceivedMessage" title="Sync">Sync</a></li><li><a href="#impl-Unpin-for-ReceivedMessage" title="Unpin">Unpin</a></li><li><a href="#impl-UnwindSafe-for-ReceivedMessage" 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-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-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>relay::<wbr>client</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_relay</a>::<wbr><a href="index.html">client</a></span><h1>Enum <span class="enum">ReceivedMessage</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/iroh_relay/client/conn.rs.html#239-282">Source</a> </span></div><pre class="rust item-decl"><code>pub enum ReceivedMessage {
|
2 | 2 | ReceivedPacket {
|
3 |
| - remote_node_id: <a class="type" href="../../iroh_base/key/type.NodeId.html" title="type iroh_base::key::NodeId">NodeId</a>, |
| 3 | + remote_node_id: NodeId, |
4 | 4 | data: Bytes,
|
5 | 5 | },
|
6 |
| - NodeGone(<a class="type" href="../../iroh_base/key/type.NodeId.html" title="type iroh_base::key::NodeId">NodeId</a>), |
| 6 | + NodeGone(NodeId), |
7 | 7 | Ping([<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">8</a>]),
|
8 | 8 | Pong([<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">8</a>]),
|
9 | 9 | KeepAlive,
|
|
17 | 17 | }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The messages received from a framed relay stream.</p>
|
18 | 18 | <p>This is a type-validated version of the <code>Frame</code>s on the <code>RelayCodec</code>.</p>
|
19 | 19 | </div></details><h2 id="variants" class="variants section-header">Variants<a href="#variants" class="anchor">§</a></h2><div class="variants"><section id="variant.ReceivedPacket" class="variant"><a href="#variant.ReceivedPacket" class="anchor">§</a><h3 class="code-header">ReceivedPacket</h3></section><div class="docblock"><p>Represents an incoming packet.</p>
|
20 |
| -</div><div class="sub-variant" id="variant.ReceivedPacket.fields"><h4>Fields</h4><div class="sub-variant-field"><span id="variant.ReceivedPacket.field.remote_node_id" class="section-header"><a href="#variant.ReceivedPacket.field.remote_node_id" class="anchor field">§</a><code>remote_node_id: <a class="type" href="../../iroh_base/key/type.NodeId.html" title="type iroh_base::key::NodeId">NodeId</a></code></span><div class="docblock"><p>The <a href="../../iroh_base/key/type.NodeId.html" title="type iroh_base::key::NodeId"><code>NodeId</code></a> of the packet sender.</p> |
| 20 | +</div><div class="sub-variant" id="variant.ReceivedPacket.fields"><h4>Fields</h4><div class="sub-variant-field"><span id="variant.ReceivedPacket.field.remote_node_id" class="section-header"><a href="#variant.ReceivedPacket.field.remote_node_id" class="anchor field">§</a><code>remote_node_id: NodeId</code></span><div class="docblock"><p>The [<code>NodeId</code>] of the packet sender.</p> |
21 | 21 | </div></div><div class="sub-variant-field"><span id="variant.ReceivedPacket.field.data" class="section-header"><a href="#variant.ReceivedPacket.field.data" class="anchor field">§</a><code>data: Bytes</code></span><div class="docblock"><p>The received packet bytes.</p>
|
22 |
| -</div></div></div><section id="variant.NodeGone" class="variant"><a href="#variant.NodeGone" class="anchor">§</a><h3 class="code-header">NodeGone(<a class="type" href="../../iroh_base/key/type.NodeId.html" title="type iroh_base::key::NodeId">NodeId</a>)</h3></section><div class="docblock"><p>Indicates that the client identified by the underlying public key had previously sent you a |
| 22 | +</div></div></div><section id="variant.NodeGone" class="variant"><a href="#variant.NodeGone" class="anchor">§</a><h3 class="code-header">NodeGone(NodeId)</h3></section><div class="docblock"><p>Indicates that the client identified by the underlying public key had previously sent you a |
23 | 23 | packet but has now disconnected from the server.</p>
|
24 | 24 | </div><section id="variant.Ping" class="variant"><a href="#variant.Ping" class="anchor">§</a><h3 class="code-header">Ping([<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">8</a>])</h3></section><div class="docblock"><p>Request from a client or server to reply to the
|
25 | 25 | other side with a <a href="enum.ReceivedMessage.html#variant.Pong" title="variant iroh_relay::client::ReceivedMessage::Pong"><code>ReceivedMessage::Pong</code></a> with the given payload.</p>
|
|
0 commit comments