deploy: 7665fab71c0c7510ee9035a063d1f6282810b50d

This commit is contained in:
flub
2026-01-08 12:55:10 +00:00
parent 95216c51bc
commit c7295c06b0
44 changed files with 2821 additions and 2768 deletions
+1 -1
View File
@@ -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="Documentation for Rustdoc"><title>Help</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="iroh" 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="./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 mod sys"><!--[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="#">All</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="./index.html"><img class="rust-logo" src="./static.files/rust-logo-9a9549ea.svg" alt="logo"></a><h2><a href="./index.html">Rustdoc</a><span class="version">1.92.0-nightly</span></h2></div><div class="version">(b6f0945e4 2025-10-08)</div><h2 class="location">Help</h2><div class="sidebar-elems"></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"><h1>Rustdoc help</h1><span class="out-of-band"><a id="back" href="javascript:void(0)" onclick="history.back();">Back</a></span></div><noscript><section><p>You need to enable JavaScript to use keyboard commands or search.</p><p>For more information, browse the <a href="https://doc.rust-lang.org/nightly/rustdoc/">rustdoc handbook</a>.</p></section></noscript></section></div></main></body></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="Documentation for Rustdoc"><title>Help</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="bulk" 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="./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 mod sys"><!--[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="#">All</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="./index.html"><img class="rust-logo" src="./static.files/rust-logo-9a9549ea.svg" alt="logo"></a><h2><a href="./index.html">Rustdoc</a><span class="version">1.92.0-nightly</span></h2></div><div class="version">(b6f0945e4 2025-10-08)</div><h2 class="location">Help</h2><div class="sidebar-elems"></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"><h1>Rustdoc help</h1><span class="out-of-band"><a id="back" href="javascript:void(0)" onclick="history.back();">Back</a></span></div><noscript><section><p>You need to enable JavaScript to use keyboard commands or search.</p><p>For more information, browse the <a href="https://doc.rust-lang.org/nightly/rustdoc/">rustdoc handbook</a>.</p></section></noscript></section></div></main></body></html>
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -1,6 +1,6 @@
<!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="Create and run a client"><title>client in iroh_bench::iroh - 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="iroh_bench" 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 fn"><!--[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="#">client</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh_bench/index.html">iroh_<wbr>bench</a><span class="version">0.95.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In iroh_<wbr>bench::<wbr>iroh</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">iroh_bench</a>::<wbr><a href="index.html">iroh</a></div><h1>Function <span class="fn">client</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/iroh_bench/iroh.rs.html#64-80">Source</a> </span></div><pre class="rust item-decl"><code>pub async fn client(
server_addr: EndpointAddr,
relay_url: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;RelayUrl&gt;,
server_addr: <a class="struct" href="../../iroh_base/endpoint_addr/struct.EndpointAddr.html" title="struct iroh_base::endpoint_addr::EndpointAddr">EndpointAddr</a>,
relay_url: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../../iroh_base/relay_url/struct.RelayUrl.html" title="struct iroh_base::relay_url::RelayUrl">RelayUrl</a>&gt;,
opt: <a class="struct" href="../struct.Opt.html" title="struct iroh_bench::Opt">Opt</a>,
) -&gt; Result&lt;<a class="struct" href="../struct.ClientStats.html" title="struct iroh_bench::ClientStats">ClientStats</a>&gt;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Create and run a client</p>
</div></details></section></div></main></body></html>
@@ -1,6 +1,6 @@
<!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="Create a client endpoint and client connection"><title>connect_client in iroh_bench::iroh - 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="iroh_bench" 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 fn"><!--[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="#">connect_client</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh_bench/index.html">iroh_<wbr>bench</a><span class="version">0.95.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In iroh_<wbr>bench::<wbr>iroh</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">iroh_bench</a>::<wbr><a href="index.html">iroh</a></div><h1>Function <span class="fn">connect_<wbr>client</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/iroh_bench/iroh.rs.html#83-123">Source</a> </span></div><pre class="rust item-decl"><code>pub async fn connect_client(
server_addr: EndpointAddr,
relay_url: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;RelayUrl&gt;,
server_addr: <a class="struct" href="../../iroh_base/endpoint_addr/struct.EndpointAddr.html" title="struct iroh_base::endpoint_addr::EndpointAddr">EndpointAddr</a>,
relay_url: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../../iroh_base/relay_url/struct.RelayUrl.html" title="struct iroh_base::relay_url::RelayUrl">RelayUrl</a>&gt;,
opt: <a class="struct" href="../struct.Opt.html" title="struct iroh_bench::Opt">Opt</a>,
) -&gt; Result&lt;(Endpoint, Connection)&gt;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Create a client endpoint and client connection</p>
) -&gt; Result&lt;(<a class="struct" href="../../iroh/endpoint/struct.Endpoint.html" title="struct iroh::endpoint::Endpoint">Endpoint</a>, <a class="struct" href="../../iroh/endpoint/connection/struct.Connection.html" title="struct iroh::endpoint::connection::Connection">Connection</a>)&gt;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Create a client endpoint and client connection</p>
</div></details></section></div></main></body></html>
@@ -1,5 +1,5 @@
<!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="API documentation for the Rust `handle_client_stream` fn in crate `iroh_bench`."><title>handle_client_stream in iroh_bench::iroh - 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="iroh_bench" 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 fn"><!--[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="#">handle_client_stream</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh_bench/index.html">iroh_<wbr>bench</a><span class="version">0.95.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In iroh_<wbr>bench::<wbr>iroh</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">iroh_bench</a>::<wbr><a href="index.html">iroh</a></div><h1>Function <span class="fn">handle_<wbr>client_<wbr>stream</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/iroh_bench/iroh.rs.html#223-244">Source</a> </span></div><pre class="rust item-decl"><code>pub async fn handle_client_stream(
connection: &amp;Connection,
connection: &amp;<a class="struct" href="../../iroh/endpoint/connection/struct.Connection.html" title="struct iroh::endpoint::connection::Connection">Connection</a>,
upload_size: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>,
read_unordered: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,
) -&gt; Result&lt;(<a class="struct" href="../stats/struct.TransferResult.html" title="struct iroh_bench::stats::TransferResult">TransferResult</a>, <a class="struct" href="../stats/struct.TransferResult.html" title="struct iroh_bench::stats::TransferResult">TransferResult</a>)&gt;</code></pre></section></div></main></body></html>
+1 -1
View File
@@ -1,2 +1,2 @@
<!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="Take the provided endpoint and run the server"><title>server in iroh_bench::iroh - 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="iroh_bench" 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 fn"><!--[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="#">server</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh_bench/index.html">iroh_<wbr>bench</a><span class="version">0.95.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In iroh_<wbr>bench::<wbr>iroh</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">iroh_bench</a>::<wbr><a href="index.html">iroh</a></div><h1>Function <span class="fn">server</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/iroh_bench/iroh.rs.html#247-298">Source</a> </span></div><pre class="rust item-decl"><code>pub async fn server(endpoint: Endpoint, opt: <a class="struct" href="../struct.Opt.html" title="struct iroh_bench::Opt">Opt</a>) -&gt; Result&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Take the provided endpoint and run the server</p>
<!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="Take the provided endpoint and run the server"><title>server in iroh_bench::iroh - 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="iroh_bench" 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 fn"><!--[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="#">server</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh_bench/index.html">iroh_<wbr>bench</a><span class="version">0.95.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In iroh_<wbr>bench::<wbr>iroh</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">iroh_bench</a>::<wbr><a href="index.html">iroh</a></div><h1>Function <span class="fn">server</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/iroh_bench/iroh.rs.html#247-298">Source</a> </span></div><pre class="rust item-decl"><code>pub async fn server(endpoint: <a class="struct" href="../../iroh/endpoint/struct.Endpoint.html" title="struct iroh::endpoint::Endpoint">Endpoint</a>, opt: <a class="struct" href="../struct.Opt.html" title="struct iroh_bench::Opt">Opt</a>) -&gt; Result&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Take the provided endpoint and run the server</p>
</div></details></section></div></main></body></html>
@@ -1,6 +1,6 @@
<!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="Creates a server endpoint which runs on the given runtime"><title>server_endpoint in iroh_bench::iroh - 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="iroh_bench" 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 fn"><!--[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="#">server_endpoint</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh_bench/index.html">iroh_<wbr>bench</a><span class="version">0.95.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In iroh_<wbr>bench::<wbr>iroh</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">iroh_bench</a>::<wbr><a href="index.html">iroh</a></div><h1>Function <span class="fn">server_<wbr>endpoint</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/iroh_bench/iroh.rs.html#21-61">Source</a> </span></div><pre class="rust item-decl"><code>pub fn server_endpoint(
rt: &amp;Runtime,
relay_url: &amp;<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;RelayUrl&gt;,
relay_url: &amp;<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../../iroh_base/relay_url/struct.RelayUrl.html" title="struct iroh_base::relay_url::RelayUrl">RelayUrl</a>&gt;,
opt: &amp;<a class="struct" href="../struct.Opt.html" title="struct iroh_bench::Opt">Opt</a>,
) -&gt; (EndpointAddr, Endpoint)</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Creates a server endpoint which runs on the given runtime</p>
) -&gt; (<a class="struct" href="../../iroh_base/endpoint_addr/struct.EndpointAddr.html" title="struct iroh_base::endpoint_addr::EndpointAddr">EndpointAddr</a>, <a class="struct" href="../../iroh/endpoint/struct.Endpoint.html" title="struct iroh::endpoint::Endpoint">Endpoint</a>)</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Creates a server endpoint which runs on the given runtime</p>
</div></details></section></div></main></body></html>
@@ -1,4 +1,4 @@
<!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="API documentation for the Rust `transport_config` fn in crate `iroh_bench`."><title>transport_config in iroh_bench::iroh - 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="iroh_bench" 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 fn"><!--[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="#">transport_config</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh_bench/index.html">iroh_<wbr>bench</a><span class="version">0.95.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In iroh_<wbr>bench::<wbr>iroh</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">iroh_bench</a>::<wbr><a href="index.html">iroh</a></div><h1>Function <span class="fn">transport_<wbr>config</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/iroh_bench/iroh.rs.html#125-142">Source</a> </span></div><pre class="rust item-decl"><code>pub fn transport_config(
max_streams: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,
initial_mtu: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>,
) -&gt; QuicTransportConfig</code></pre></section></div></main></body></html>
) -&gt; <a class="struct" href="../../iroh/endpoint/quic/struct.QuicTransportConfig.html" title="struct iroh::endpoint::quic::QuicTransportConfig">QuicTransportConfig</a></code></pre></section></div></main></body></html>
File diff suppressed because one or more lines are too long
@@ -73,9 +73,9 @@ at T+0ms, T+200ms and T+300ms. The <code>timeout</code> is applied as stated in
summary of all errors otherwise.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.lookup_endpoint_by_id" class="method"><a class="src rightside" href="../../src/iroh_relay/dns.rs.html#389-399">Source</a><h4 class="code-header">pub async fn <a href="#method.lookup_endpoint_by_id" class="fn">lookup_endpoint_by_id</a>(
&amp;self,
endpoint_id: &amp;<a class="type" href="../../iroh_base/key/type.EndpointId.html" title="type iroh_base::key::EndpointId">EndpointId</a>,
endpoint_id: &amp;EndpointId,
origin: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../endpoint_info/struct.EndpointInfo.html" title="struct iroh_relay::endpoint_info::EndpointInfo">EndpointInfo</a>, <a class="enum" href="enum.LookupError.html" title="enum iroh_relay::dns::LookupError">LookupError</a>&gt;</h4></section></summary><div class="docblock"><p>Looks up endpoint info by <a href="../../iroh_base/key/type.EndpointId.html" title="type iroh_base::key::EndpointId"><code>EndpointId</code></a> and origin domain name.</p>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../endpoint_info/struct.EndpointInfo.html" title="struct iroh_relay::endpoint_info::EndpointInfo">EndpointInfo</a>, <a class="enum" href="enum.LookupError.html" title="enum iroh_relay::dns::LookupError">LookupError</a>&gt;</h4></section></summary><div class="docblock"><p>Looks up endpoint info by [<code>EndpointId</code>] and origin domain name.</p>
<p>To lookup endpoints that published their endpoint info to the DNS servers run by n0,
pass <a href="constant.N0_DNS_ENDPOINT_ORIGIN_PROD.html" title="constant iroh_relay::dns::N0_DNS_ENDPOINT_ORIGIN_PROD"><code>N0_DNS_ENDPOINT_ORIGIN_PROD</code></a> as <code>origin</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.lookup_endpoint_by_domain_name" class="method"><a class="src rightside" href="../../src/iroh_relay/dns.rs.html#402-410">Source</a><h4 class="code-header">pub async fn <a href="#method.lookup_endpoint_by_domain_name" class="fn">lookup_endpoint_by_domain_name</a>(
@@ -93,10 +93,10 @@ at T+0ms, T+200ms and T+300ms. The result of the first successful call is return
summary of all errors otherwise.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.lookup_endpoint_by_id_staggered" class="method"><a class="src rightside" href="../../src/iroh_relay/dns.rs.html#433-441">Source</a><h4 class="code-header">pub async fn <a href="#method.lookup_endpoint_by_id_staggered" class="fn">lookup_endpoint_by_id_staggered</a>(
&amp;self,
endpoint_id: &amp;<a class="type" href="../../iroh_base/key/type.EndpointId.html" title="type iroh_base::key::EndpointId">EndpointId</a>,
endpoint_id: &amp;EndpointId,
origin: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
delays_ms: &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>],
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../endpoint_info/struct.EndpointInfo.html" title="struct iroh_relay::endpoint_info::EndpointInfo">EndpointInfo</a>, <a class="struct" href="struct.StaggeredError.html" title="struct iroh_relay::dns::StaggeredError">StaggeredError</a>&lt;<a class="enum" href="enum.LookupError.html" title="enum iroh_relay::dns::LookupError">LookupError</a>&gt;&gt;</h4></section></summary><div class="docblock"><p>Looks up endpoint info by <a href="../../iroh_base/key/type.EndpointId.html" title="type iroh_base::key::EndpointId"><code>EndpointId</code></a> and origin domain name.</p>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../endpoint_info/struct.EndpointInfo.html" title="struct iroh_relay::endpoint_info::EndpointInfo">EndpointInfo</a>, <a class="struct" href="struct.StaggeredError.html" title="struct iroh_relay::dns::StaggeredError">StaggeredError</a>&lt;<a class="enum" href="enum.LookupError.html" title="enum iroh_relay::dns::LookupError">LookupError</a>&gt;&gt;</h4></section></summary><div class="docblock"><p>Looks up endpoint info by [<code>EndpointId</code>] and origin domain name.</p>
<p>From the moment this function is called, each lookup is scheduled after the delays in
<code>delays_ms</code> with the first call being done immediately. <code>[200ms, 300ms]</code> results in calls
at T+0ms, T+200ms and T+300ms. The result of the first successful call is returned, or a
File diff suppressed because one or more lines are too long
@@ -1,5 +1,5 @@
<!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="Support for handling DNS resource records for dialing by `EndpointId`."><title>iroh_relay::endpoint_info - 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="iroh_relay" 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 mod"><!--[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="#">Module endpoint_info</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh_relay/index.html">iroh_<wbr>relay</a><span class="version">0.95.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module endpoint_<wbr>info</a></h2><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#enums" title="Enums">Enums</a></li><li><a href="#constants" title="Constants">Constants</a></li><li><a href="#traits" title="Traits">Traits</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate iroh_<wbr>relay</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">iroh_relay</a></div><h1>Module <span>endpoint_<wbr>info</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/iroh_relay/endpoint_info.rs.html#1-790">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Support for handling DNS resource records for dialing by <a href="../../iroh_base/key/type.EndpointId.html" title="type iroh_base::key::EndpointId"><code>EndpointId</code></a>.</p>
<p>Dialing by <a href="../../iroh_base/key/type.EndpointId.html" title="type iroh_base::key::EndpointId"><code>EndpointId</code></a> is supported by iroh endpoints publishing <a href="https://app.pkarr.org">Pkarr</a> records to DNS
<!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="Support for handling DNS resource records for dialing by `EndpointId`."><title>iroh_relay::endpoint_info - 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="iroh_relay" 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 mod"><!--[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="#">Module endpoint_info</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh_relay/index.html">iroh_<wbr>relay</a><span class="version">0.95.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module endpoint_<wbr>info</a></h2><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#enums" title="Enums">Enums</a></li><li><a href="#constants" title="Constants">Constants</a></li><li><a href="#traits" title="Traits">Traits</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate iroh_<wbr>relay</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">iroh_relay</a></div><h1>Module <span>endpoint_<wbr>info</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/iroh_relay/endpoint_info.rs.html#1-790">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Support for handling DNS resource records for dialing by [<code>EndpointId</code>].</p>
<p>Dialing by [<code>EndpointId</code>] is supported by iroh endpoints publishing <a href="https://app.pkarr.org">Pkarr</a> records to DNS
servers or the Mainline DHT. This module supports creating and parsing these records.</p>
<p>DNS records are published under the following names:</p>
<p><code>_iroh.&lt;z32-endpoint-id&gt;.&lt;origin-domain&gt; TXT</code></p>
@@ -8,7 +8,7 @@ servers or the Mainline DHT. This module supports creating and parsing these re
<p><code>_iroh</code> is the record name as defined by <a href="constant.IROH_TXT_NAME.html" title="constant iroh_relay::endpoint_info::IROH_TXT_NAME"><code>IROH_TXT_NAME</code></a>.</p>
</li>
<li>
<p><code>&lt;z32-endpoint-id&gt;</code> is the <a href="https://philzimmermann.com/docs/human-oriented-base-32-encoding.txt">z-base-32</a> encoding of the <a href="../../iroh_base/key/type.EndpointId.html" title="type iroh_base::key::EndpointId"><code>EndpointId</code></a>.</p>
<p><code>&lt;z32-endpoint-id&gt;</code> is the <a href="https://philzimmermann.com/docs/human-oriented-base-32-encoding.txt">z-base-32</a> encoding of the [<code>EndpointId</code>].</p>
</li>
<li>
<p><code>&lt;origin-domain&gt;</code> is the domain name of the publishing DNS server,
@@ -23,12 +23,12 @@ servers or the Mainline DHT. This module supports creating and parsing these re
in <a href="https://www.rfc-editor.org/rfc/rfc1464">RFC1464</a>. The following attributes are defined:</p>
<ul>
<li>
<p><code>relay=&lt;url&gt;</code>: The home <a href="../../iroh_base/relay_url/struct.RelayUrl.html" title="struct iroh_base::relay_url::RelayUrl"><code>RelayUrl</code></a> of this endpoint.</p>
<p><code>relay=&lt;url&gt;</code>: The home <a href="iroh_base::RelayUrl"><code>RelayUrl</code></a> of this endpoint.</p>
</li>
<li>
<p><code>addr=&lt;addr&gt; &lt;addr&gt;</code>: A space-separated list of sockets addresses for this iroh endpoint.
Each address is an IPv4 or IPv6 address with a port.</p>
</li>
</ul>
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.EndpointData.html" title="struct iroh_relay::endpoint_info::EndpointData">Endpoint<wbr>Data</a></dt><dd>Data about an endpoint that may be published to and resolved from discovery services.</dd><dt><a class="struct" href="struct.EndpointInfo.html" title="struct iroh_relay::endpoint_info::EndpointInfo">Endpoint<wbr>Info</a></dt><dd>Information about an endpoint that may be published to and resolved from discovery services.</dd><dt><a class="struct" href="struct.MaxLengthExceededError.html" title="struct iroh_relay::endpoint_info::MaxLengthExceededError">MaxLength<wbr>Exceeded<wbr>Error</a></dt><dd>Error returned when an input value is too long for <a href="struct.UserData.html" title="struct iroh_relay::endpoint_info::UserData"><code>UserData</code></a>.</dd><dt><a class="struct" href="struct.UserData.html" title="struct iroh_relay::endpoint_info::UserData">User<wbr>Data</a></dt><dd>Under the hood this is a UTF-8 String is no longer than <a href="struct.UserData.html#associatedconstant.MAX_LENGTH" title="associated constant iroh_relay::endpoint_info::UserData::MAX_LENGTH"><code>UserData::MAX_LENGTH</code></a> bytes.</dd></dl><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><dl class="item-table"><dt><a class="enum" href="enum.DecodingError.html" title="enum iroh_relay::endpoint_info::DecodingError">Decoding<wbr>Error</a></dt><dt><a class="enum" href="enum.EncodingError.html" title="enum iroh_relay::endpoint_info::EncodingError">Encoding<wbr>Error</a></dt><dt><a class="enum" href="enum.ParseError.html" title="enum iroh_relay::endpoint_info::ParseError">Parse<wbr>Error</a></dt></dl><h2 id="constants" class="section-header">Constants<a href="#constants" class="anchor">§</a></h2><dl class="item-table"><dt><a class="constant" href="constant.IROH_TXT_NAME.html" title="constant iroh_relay::endpoint_info::IROH_TXT_NAME">IROH_<wbr>TXT_<wbr>NAME</a></dt><dd>The DNS name for the iroh TXT record.</dd></dl><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><dl class="item-table"><dt><a class="trait" href="trait.EndpointIdExt.html" title="trait iroh_relay::endpoint_info::EndpointIdExt">Endpoint<wbr>IdExt</a></dt><dd>Extension methods for <a href="../../iroh_base/key/type.EndpointId.html" title="type iroh_base::key::EndpointId"><code>EndpointId</code></a> to encode to and decode from [<code>z32</code>],
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.EndpointData.html" title="struct iroh_relay::endpoint_info::EndpointData">Endpoint<wbr>Data</a></dt><dd>Data about an endpoint that may be published to and resolved from discovery services.</dd><dt><a class="struct" href="struct.EndpointInfo.html" title="struct iroh_relay::endpoint_info::EndpointInfo">Endpoint<wbr>Info</a></dt><dd>Information about an endpoint that may be published to and resolved from discovery services.</dd><dt><a class="struct" href="struct.MaxLengthExceededError.html" title="struct iroh_relay::endpoint_info::MaxLengthExceededError">MaxLength<wbr>Exceeded<wbr>Error</a></dt><dd>Error returned when an input value is too long for <a href="struct.UserData.html" title="struct iroh_relay::endpoint_info::UserData"><code>UserData</code></a>.</dd><dt><a class="struct" href="struct.UserData.html" title="struct iroh_relay::endpoint_info::UserData">User<wbr>Data</a></dt><dd>Under the hood this is a UTF-8 String is no longer than <a href="struct.UserData.html#associatedconstant.MAX_LENGTH" title="associated constant iroh_relay::endpoint_info::UserData::MAX_LENGTH"><code>UserData::MAX_LENGTH</code></a> bytes.</dd></dl><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><dl class="item-table"><dt><a class="enum" href="enum.DecodingError.html" title="enum iroh_relay::endpoint_info::DecodingError">Decoding<wbr>Error</a></dt><dt><a class="enum" href="enum.EncodingError.html" title="enum iroh_relay::endpoint_info::EncodingError">Encoding<wbr>Error</a></dt><dt><a class="enum" href="enum.ParseError.html" title="enum iroh_relay::endpoint_info::ParseError">Parse<wbr>Error</a></dt></dl><h2 id="constants" class="section-header">Constants<a href="#constants" class="anchor">§</a></h2><dl class="item-table"><dt><a class="constant" href="constant.IROH_TXT_NAME.html" title="constant iroh_relay::endpoint_info::IROH_TXT_NAME">IROH_<wbr>TXT_<wbr>NAME</a></dt><dd>The DNS name for the iroh TXT record.</dd></dl><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><dl class="item-table"><dt><a class="trait" href="trait.EndpointIdExt.html" title="trait iroh_relay::endpoint_info::EndpointIdExt">Endpoint<wbr>IdExt</a></dt><dd>Extension methods for [<code>EndpointId</code>] to encode to and decode from [<code>z32</code>],
which is the encoding used in [<code>pkarr</code>] domain names.</dd></dl></section></div></main></body></html>
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,9 +1,9 @@
<!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="Extension methods for `EndpointId` to encode to and decode from `z32`, which is the encoding used in `pkarr` domain names."><title>EndpointIdExt in iroh_relay::endpoint_info - 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="iroh_relay" 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 trait"><!--[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="#">EndpointIdExt</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh_relay/index.html">iroh_<wbr>relay</a><span class="version">0.95.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Endpoint<wbr>IdExt</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.from_z32" title="from_z32">from_z32</a></li><li><a href="#tymethod.to_z32" title="to_z32">to_z32</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-EndpointIdExt-for-PublicKey" title="EndpointId">EndpointId</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In iroh_<wbr>relay::<wbr>endpoint_<wbr>info</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">iroh_relay</a>::<wbr><a href="index.html">endpoint_info</a></div><h1>Trait <span class="trait">Endpoint<wbr>IdExt</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/iroh_relay/endpoint_info.rs.html#83-93">Source</a> </span></div><pre class="rust item-decl"><code>pub trait EndpointIdExt {
// Required methods
fn <a href="#tymethod.to_z32" class="fn">to_z32</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.from_z32" class="fn">from_z32</a>(s: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="type" href="../../iroh_base/key/type.EndpointId.html" title="type iroh_base::key::EndpointId">EndpointId</a>, <a class="enum" href="enum.DecodingError.html" title="enum iroh_relay::endpoint_info::DecodingError">DecodingError</a>&gt;;
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Extension methods for <a href="../../iroh_base/key/type.EndpointId.html" title="type iroh_base::key::EndpointId"><code>EndpointId</code></a> to encode to and decode from [<code>z32</code>],
<span class="item-spacer"></span> fn <a href="#tymethod.from_z32" class="fn">from_z32</a>(s: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;EndpointId, <a class="enum" href="enum.DecodingError.html" title="enum iroh_relay::endpoint_info::DecodingError">DecodingError</a>&gt;;
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Extension methods for [<code>EndpointId</code>] to encode to and decode from [<code>z32</code>],
which is the encoding used in [<code>pkarr</code>] domain names.</p>
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.to_z32" class="method"><a class="src rightside" href="../../src/iroh_relay/endpoint_info.rs.html#87">Source</a><h4 class="code-header">fn <a href="#tymethod.to_z32" class="fn">to_z32</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section></summary><div class="docblock"><p>Encodes a <a href="../../iroh_base/key/type.EndpointId.html" title="type iroh_base::key::EndpointId"><code>EndpointId</code></a> in <a href="https://philzimmermann.com/docs/human-oriented-base-32-encoding.txt"><code>z-base-32</code></a> encoding.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.from_z32" class="method"><a class="src rightside" href="../../src/iroh_relay/endpoint_info.rs.html#92">Source</a><h4 class="code-header">fn <a href="#tymethod.from_z32" class="fn">from_z32</a>(s: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="type" href="../../iroh_base/key/type.EndpointId.html" title="type iroh_base::key::EndpointId">EndpointId</a>, <a class="enum" href="enum.DecodingError.html" title="enum iroh_relay::endpoint_info::DecodingError">DecodingError</a>&gt;</h4></section></summary><div class="docblock"><p>Parses a <a href="../../iroh_base/key/type.EndpointId.html" title="type iroh_base::key::EndpointId"><code>EndpointId</code></a> from <a href="https://philzimmermann.com/docs/human-oriented-base-32-encoding.txt"><code>z-base-32</code></a> encoding.</p>
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/nightly/reference/items/traits.html#dyn-compatibility">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><details class="toggle implementors-toggle"><summary><section id="impl-EndpointIdExt-for-PublicKey" class="impl"><a class="src rightside" href="../../src/iroh_relay/endpoint_info.rs.html#95-110">Source</a><a href="#impl-EndpointIdExt-for-PublicKey" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.EndpointIdExt.html" title="trait iroh_relay::endpoint_info::EndpointIdExt">EndpointIdExt</a> for <a class="type" href="../../iroh_base/key/type.EndpointId.html" title="type iroh_base::key::EndpointId">EndpointId</a></h3></section></summary><div class="impl-items"><section id="method.to_z32" class="method trait-impl"><a class="src rightside" href="../../src/iroh_relay/endpoint_info.rs.html#96-98">Source</a><a href="#method.to_z32" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_z32" class="fn">to_z32</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section><section id="method.from_z32" class="method trait-impl"><a class="src rightside" href="../../src/iroh_relay/endpoint_info.rs.html#100-109">Source</a><a href="#method.from_z32" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.from_z32" class="fn">from_z32</a>(s: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="type" href="../../iroh_base/key/type.EndpointId.html" title="type iroh_base::key::EndpointId">EndpointId</a>, <a class="enum" href="enum.DecodingError.html" title="enum iroh_relay::endpoint_info::DecodingError">DecodingError</a>&gt;</h4></section></div></details><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../../trait.impl/iroh_relay/endpoint_info/trait.EndpointIdExt.js" data-ignore-extern-crates="iroh_base" async></script></section></div></main></body></html>
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.to_z32" class="method"><a class="src rightside" href="../../src/iroh_relay/endpoint_info.rs.html#87">Source</a><h4 class="code-header">fn <a href="#tymethod.to_z32" class="fn">to_z32</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section></summary><div class="docblock"><p>Encodes a [<code>EndpointId</code>] in <a href="https://philzimmermann.com/docs/human-oriented-base-32-encoding.txt"><code>z-base-32</code></a> encoding.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.from_z32" class="method"><a class="src rightside" href="../../src/iroh_relay/endpoint_info.rs.html#92">Source</a><h4 class="code-header">fn <a href="#tymethod.from_z32" class="fn">from_z32</a>(s: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;EndpointId, <a class="enum" href="enum.DecodingError.html" title="enum iroh_relay::endpoint_info::DecodingError">DecodingError</a>&gt;</h4></section></summary><div class="docblock"><p>Parses a [<code>EndpointId</code>] from <a href="https://philzimmermann.com/docs/human-oriented-base-32-encoding.txt"><code>z-base-32</code></a> encoding.</p>
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/nightly/reference/items/traits.html#dyn-compatibility">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><details class="toggle implementors-toggle"><summary><section id="impl-EndpointIdExt-for-PublicKey" class="impl"><a class="src rightside" href="../../src/iroh_relay/endpoint_info.rs.html#95-110">Source</a><a href="#impl-EndpointIdExt-for-PublicKey" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.EndpointIdExt.html" title="trait iroh_relay::endpoint_info::EndpointIdExt">EndpointIdExt</a> for EndpointId</h3></section></summary><div class="impl-items"><section id="method.to_z32" class="method trait-impl"><a class="src rightside" href="../../src/iroh_relay/endpoint_info.rs.html#96-98">Source</a><a href="#method.to_z32" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_z32" class="fn">to_z32</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section><section id="method.from_z32" class="method trait-impl"><a class="src rightside" href="../../src/iroh_relay/endpoint_info.rs.html#100-109">Source</a><a href="#method.from_z32" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.from_z32" class="fn">from_z32</a>(s: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;EndpointId, <a class="enum" href="enum.DecodingError.html" title="enum iroh_relay::endpoint_info::DecodingError">DecodingError</a>&gt;</h4></section></div></details><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../../trait.impl/iroh_relay/endpoint_info/trait.EndpointIdExt.js" data-ignore-extern-crates="iroh_base" async></script></section></div></main></body></html>
+1 -1
View File
@@ -25,6 +25,6 @@ Tailscale.</p>
QAD support and expose metrics.</p>
</li>
</ul>
</div></details><h2 id="reexports" class="section-header">Re-exports<a href="#reexports" class="anchor">§</a></h2><dl class="item-table reexports"><dt id="reexport.MAX_PACKET_SIZE"><code>pub use protos::relay::<a class="constant" href="protos/relay/constant.MAX_PACKET_SIZE.html" title="constant iroh_relay::protos::relay::MAX_PACKET_SIZE">MAX_PACKET_SIZE</a>;</code></dt></dl><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><dl class="item-table"><dt><a class="mod" href="client/index.html" title="mod iroh_relay::client">client</a></dt><dd>Exposes <a href="client/struct.Client.html" title="struct iroh_relay::client::Client"><code>Client</code></a>, which allows to establish connections to a relay server.</dd><dt><a class="mod" href="defaults/index.html" title="mod iroh_relay::defaults">defaults</a></dt><dd>Default values used in the relay.</dd><dt><a class="mod" href="dns/index.html" title="mod iroh_relay::dns">dns</a><wbr><span class="stab portability" title="Available on non-`wasm_browser` only">Non-<code>wasm_browser</code></span></dt><dd>DNS resolver</dd><dt><a class="mod" href="endpoint_info/index.html" title="mod iroh_relay::endpoint_info">endpoint_<wbr>info</a></dt><dd>Support for handling DNS resource records for dialing by <a href="../iroh_base/key/type.EndpointId.html" title="type iroh_base::key::EndpointId"><code>EndpointId</code></a>.</dd><dt><a class="mod" href="http/index.html" title="mod iroh_relay::http">http</a></dt><dd>HTTP-specific constants for the relay server and client.</dd><dt><a class="mod" href="protos/index.html" title="mod iroh_relay::protos">protos</a></dt><dd>Protocols used by the iroh-relay</dd><dt><a class="mod" href="quic/index.html" title="mod iroh_relay::quic">quic</a></dt><dd>Create a QUIC server that accepts connections
</div></details><h2 id="reexports" class="section-header">Re-exports<a href="#reexports" class="anchor">§</a></h2><dl class="item-table reexports"><dt id="reexport.MAX_PACKET_SIZE"><code>pub use protos::relay::<a class="constant" href="protos/relay/constant.MAX_PACKET_SIZE.html" title="constant iroh_relay::protos::relay::MAX_PACKET_SIZE">MAX_PACKET_SIZE</a>;</code></dt></dl><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><dl class="item-table"><dt><a class="mod" href="client/index.html" title="mod iroh_relay::client">client</a></dt><dd>Exposes <a href="client/struct.Client.html" title="struct iroh_relay::client::Client"><code>Client</code></a>, which allows to establish connections to a relay server.</dd><dt><a class="mod" href="defaults/index.html" title="mod iroh_relay::defaults">defaults</a></dt><dd>Default values used in the relay.</dd><dt><a class="mod" href="dns/index.html" title="mod iroh_relay::dns">dns</a><wbr><span class="stab portability" title="Available on non-`wasm_browser` only">Non-<code>wasm_browser</code></span></dt><dd>DNS resolver</dd><dt><a class="mod" href="endpoint_info/index.html" title="mod iroh_relay::endpoint_info">endpoint_<wbr>info</a></dt><dd>Support for handling DNS resource records for dialing by [<code>EndpointId</code>].</dd><dt><a class="mod" href="http/index.html" title="mod iroh_relay::http">http</a></dt><dd>HTTP-specific constants for the relay server and client.</dd><dt><a class="mod" href="protos/index.html" title="mod iroh_relay::protos">protos</a></dt><dd>Protocols used by the iroh-relay</dd><dt><a class="mod" href="quic/index.html" title="mod iroh_relay::quic">quic</a></dt><dd>Create a QUIC server that accepts connections
for QUIC address discovery.</dd><dt><a class="mod" href="server/index.html" title="mod iroh_relay::server">server</a><wbr><span class="stab portability" title="Available on crate feature `server` only"><code>server</code></span></dt><dd>A fully-fledged iroh-relay server over HTTP or HTTPS.</dd></dl><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.PingTracker.html" title="struct iroh_relay::PingTracker">Ping<wbr>Tracker</a></dt><dd>Tracks pings on a single relay connection.</dd><dt><a class="struct" href="struct.RelayConfig.html" title="struct iroh_relay::RelayConfig">Relay<wbr>Config</a></dt><dd>Information on a specific relay server.</dd><dt><a class="struct" href="struct.RelayMap.html" title="struct iroh_relay::RelayMap">Relay<wbr>Map</a></dt><dd>List of relay server configurations to be used in an iroh endpoint.</dd><dt><a class="struct" href="struct.RelayQuicConfig.html" title="struct iroh_relay::RelayQuicConfig">Relay<wbr>Quic<wbr>Config</a></dt><dd>Configuration for speaking to the QUIC endpoint on the relay
server to do QUIC address discovery.</dd></dl><script type="text/json" id="notable-traits-data">{"&[u8]":"<h3>Notable traits for <code>&amp;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</code></h3><pre><code><div class=\"where\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/io/trait.Read.html\" title=\"trait std::io::Read\">Read</a> for &amp;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</div>"}</script></section></div></main></body></html>
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -17,9 +17,9 @@ case there is an error in the server before it is shut down.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.http_addr" class="method"><a class="src rightside" href="../../src/iroh_relay/server.rs.html#505-507">Source</a><h4 class="code-header">pub fn <a href="#method.http_addr" class="fn">http_addr</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/net/socket_addr/enum.SocketAddr.html" title="enum core::net::socket_addr::SocketAddr">SocketAddr</a>&gt;</h4></section></summary><div class="docblock"><p>The socket address the HTTP server is listening on.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.quic_addr" class="method"><a class="src rightside" href="../../src/iroh_relay/server.rs.html#510-512">Source</a><h4 class="code-header">pub fn <a href="#method.quic_addr" class="fn">quic_addr</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/net/socket_addr/enum.SocketAddr.html" title="enum core::net::socket_addr::SocketAddr">SocketAddr</a>&gt;</h4></section></summary><div class="docblock"><p>The socket address the QUIC server is listening on.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.certificates" class="method"><a class="src rightside" href="../../src/iroh_relay/server.rs.html#515-517">Source</a><h4 class="code-header">pub fn <a href="#method.certificates" class="fn">certificates</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;CertificateDer&lt;'static&gt;&gt;&gt;</h4></section></summary><div class="docblock"><p>The certificates chain if configured with manual TLS certificates.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.https_url" class="method"><a class="src rightside" href="../../src/iroh_relay/server.rs.html#523-529">Source</a><h4 class="code-header">pub fn <a href="#method.https_url" class="fn">https_url</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../../iroh_base/relay_url/struct.RelayUrl.html" title="struct iroh_base::relay_url::RelayUrl">RelayUrl</a>&gt;</h4></section><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>test-utils</code></strong> only.</div></span></summary><div class="docblock"><p>Get the server’s https <a href="../../iroh_base/relay_url/struct.RelayUrl.html" title="struct iroh_base::relay_url::RelayUrl"><code>RelayUrl</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.https_url" class="method"><a class="src rightside" href="../../src/iroh_relay/server.rs.html#523-529">Source</a><h4 class="code-header">pub fn <a href="#method.https_url" class="fn">https_url</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;RelayUrl&gt;</h4></section><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>test-utils</code></strong> only.</div></span></summary><div class="docblock"><p>Get the server’s https [<code>RelayUrl</code>].</p>
<p>This uses <a href="struct.Server.html#method.https_addr" title="method iroh_relay::server::Server::https_addr"><code>Self::https_addr</code></a> so it’s mostly useful for local development.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.http_url" class="method"><a class="src rightside" href="../../src/iroh_relay/server.rs.html#535-541">Source</a><h4 class="code-header">pub fn <a href="#method.http_url" class="fn">http_url</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../../iroh_base/relay_url/struct.RelayUrl.html" title="struct iroh_base::relay_url::RelayUrl">RelayUrl</a>&gt;</h4></section><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>test-utils</code></strong> only.</div></span></summary><div class="docblock"><p>Get the server’s http <a href="../../iroh_base/relay_url/struct.RelayUrl.html" title="struct iroh_base::relay_url::RelayUrl"><code>RelayUrl</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.http_url" class="method"><a class="src rightside" href="../../src/iroh_relay/server.rs.html#535-541">Source</a><h4 class="code-header">pub fn <a href="#method.http_url" class="fn">http_url</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;RelayUrl&gt;</h4></section><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>test-utils</code></strong> only.</div></span></summary><div class="docblock"><p>Get the server’s http [<code>RelayUrl</code>].</p>
<p>This uses <a href="struct.Server.html#method.http_addr" title="method iroh_relay::server::Server::http_addr"><code>Self::http_addr</code></a> so it’s mostly useful for local development.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.metrics" class="method"><a class="src rightside" href="../../src/iroh_relay/server.rs.html#544-546">Source</a><h4 class="code-header">pub fn <a href="#method.metrics" class="fn">metrics</a>(&amp;self) -&gt; &amp;<a class="struct" href="struct.RelayMetrics.html" title="struct iroh_relay::server::RelayMetrics">RelayMetrics</a></h4></section></summary><div class="docblock"><p>Returns the metrics collected in the relay server.</p>
</div></details></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-Server" class="impl"><a class="src rightside" href="../../src/iroh_relay/server.rs.html#242">Source</a><a href="#impl-Debug-for-Server" 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.Server.html" title="struct iroh_relay::server::Server">Server</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/iroh_relay/server.rs.html#242">Source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&amp;self, __derive_more_f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-Freeze-for-Server" class="impl"><a href="#impl-Freeze-for-Server" 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.Server.html" title="struct iroh_relay::server::Server">Server</a></h3></section><section id="impl-RefUnwindSafe-for-Server" class="impl"><a href="#impl-RefUnwindSafe-for-Server" 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.Server.html" title="struct iroh_relay::server::Server">Server</a></h3></section><section id="impl-Send-for-Server" class="impl"><a href="#impl-Send-for-Server" 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.Server.html" title="struct iroh_relay::server::Server">Server</a></h3></section><section id="impl-Sync-for-Server" class="impl"><a href="#impl-Sync-for-Server" 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.Server.html" title="struct iroh_relay::server::Server">Server</a></h3></section><section id="impl-Unpin-for-Server" class="impl"><a href="#impl-Unpin-for-Server" 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.Server.html" title="struct iroh_relay::server::Server">Server</a></h3></section><section id="impl-UnwindSafe-for-Server" class="impl"><a href="#impl-UnwindSafe-for-Server" 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.Server.html" title="struct iroh_relay::server::Server">Server</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#138">Source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -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="Settings of Rustdoc"><title>Settings</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="iroh" 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="./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 mod sys"><!--[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="#">All</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="./index.html"><img class="rust-logo" src="./static.files/rust-logo-9a9549ea.svg" alt="logo"></a><h2><a href="./index.html">Rustdoc</a><span class="version">1.92.0-nightly</span></h2></div><div class="version">(b6f0945e4 2025-10-08)</div><h2 class="location">Settings</h2><div class="sidebar-elems"></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"><h1>Rustdoc settings</h1><span class="out-of-band"><a id="back" href="javascript:void(0)" onclick="history.back();">Back</a></span></div><noscript><section>You need to enable JavaScript be able to update your settings.</section></noscript><script defer src="./static.files/settings-c38705f0.js"></script></section></div></main></body></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="Settings of Rustdoc"><title>Settings</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="bulk" 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="./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 mod sys"><!--[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="#">All</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="./index.html"><img class="rust-logo" src="./static.files/rust-logo-9a9549ea.svg" alt="logo"></a><h2><a href="./index.html">Rustdoc</a><span class="version">1.92.0-nightly</span></h2></div><div class="version">(b6f0945e4 2025-10-08)</div><h2 class="location">Settings</h2><div class="sidebar-elems"></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"><h1>Rustdoc settings</h1><span class="out-of-band"><a id="back" href="javascript:void(0)" onclick="history.back();">Back</a></span></div><noscript><section>You need to enable JavaScript be able to update your settings.</section></noscript><script defer src="./static.files/settings-c38705f0.js"></script></section></div></main></body></html>
File diff suppressed because it is too large Load Diff
+159 -148
View File
@@ -98,154 +98,165 @@
<a href=#98 id=98 data-nosnippet>98</a> handles.retain(|_eid, handle| !handle.sender.is_closed())
<a href=#99 id=99 data-nosnippet>99</a> }
<a href=#100 id=100 data-nosnippet>100</a>
<a href=#101 id=101 data-nosnippet>101</a> <span class="doccomment">/// Returns the sender for the [`RemoteStateActor`].
<a href=#102 id=102 data-nosnippet>102</a> ///
<a href=#103 id=103 data-nosnippet>103</a> /// If needed a new actor is started on demand.
<a href=#104 id=104 data-nosnippet>104</a> ///
<a href=#105 id=105 data-nosnippet>105</a> /// [`RemoteStateActor`]: remote_state::RemoteStateActor
<a href=#106 id=106 data-nosnippet>106</a> </span><span class="kw">pub</span>(<span class="kw">super</span>) <span class="kw">fn </span>remote_state_actor(<span class="kw-2">&amp;</span><span class="self">self</span>, eid: EndpointId) -&gt; mpsc::Sender&lt;RemoteStateMessage&gt; {
<a href=#107 id=107 data-nosnippet>107</a> <span class="kw">let </span><span class="kw-2">mut </span>handles = <span class="self">self</span>.actor_handles.lock().expect(<span class="string">"poisoned"</span>);
<a href=#108 id=108 data-nosnippet>108</a> <span class="kw">match </span>handles.entry(eid) {
<a href=#109 id=109 data-nosnippet>109</a> hash_map::Entry::Occupied(<span class="kw-2">mut </span>entry) =&gt; {
<a href=#110 id=110 data-nosnippet>110</a> <span class="kw">if let </span><span class="prelude-val">Some</span>(sender) = entry.get().sender.get() {
<a href=#111 id=111 data-nosnippet>111</a> sender
<a href=#112 id=112 data-nosnippet>112</a> } <span class="kw">else </span>{
<a href=#113 id=113 data-nosnippet>113</a> <span class="comment">// The actor is dead: Start a new actor.
<a href=#114 id=114 data-nosnippet>114</a> </span><span class="kw">let </span>(handle, sender) = <span class="self">self</span>.start_remote_state_actor(eid);
<a href=#115 id=115 data-nosnippet>115</a> entry.insert(handle);
<a href=#116 id=116 data-nosnippet>116</a> sender
<a href=#117 id=117 data-nosnippet>117</a> }
<a href=#118 id=118 data-nosnippet>118</a> }
<a href=#119 id=119 data-nosnippet>119</a> hash_map::Entry::Vacant(entry) =&gt; {
<a href=#120 id=120 data-nosnippet>120</a> <span class="kw">let </span>(handle, sender) = <span class="self">self</span>.start_remote_state_actor(eid);
<a href=#121 id=121 data-nosnippet>121</a> entry.insert(handle);
<a href=#122 id=122 data-nosnippet>122</a> sender
<a href=#123 id=123 data-nosnippet>123</a> }
<a href=#124 id=124 data-nosnippet>124</a> }
<a href=#125 id=125 data-nosnippet>125</a> }
<a href=#126 id=126 data-nosnippet>126</a>
<a href=#127 id=127 data-nosnippet>127</a> <span class="kw">pub</span>(<span class="kw">super</span>) <span class="kw">fn </span>remote_state_actor_if_exists(
<a href=#128 id=128 data-nosnippet>128</a> <span class="kw-2">&amp;</span><span class="self">self</span>,
<a href=#129 id=129 data-nosnippet>129</a> eid: EndpointId,
<a href=#130 id=130 data-nosnippet>130</a> ) -&gt; <span class="prelude-ty">Option</span>&lt;mpsc::Sender&lt;RemoteStateMessage&gt;&gt; {
<a href=#131 id=131 data-nosnippet>131</a> <span class="self">self</span>.actor_handles
<a href=#132 id=132 data-nosnippet>132</a> .lock()
<a href=#133 id=133 data-nosnippet>133</a> .expect(<span class="string">"poisoned"</span>)
<a href=#134 id=134 data-nosnippet>134</a> .get(<span class="kw-2">&amp;</span>eid)
<a href=#135 id=135 data-nosnippet>135</a> .and_then(|handle| handle.sender.get())
<a href=#101 id=101 data-nosnippet>101</a> <span class="kw">pub</span>(<span class="kw">super</span>) <span class="kw">fn </span>on_network_change(<span class="kw-2">&amp;</span><span class="self">self</span>, is_major: bool) {
<a href=#102 id=102 data-nosnippet>102</a> <span class="kw">let </span>handles = <span class="self">self</span>.actor_handles.lock().expect(<span class="string">"poisoned"</span>);
<a href=#103 id=103 data-nosnippet>103</a> <span class="kw">for </span>entry <span class="kw">in </span>handles.values() {
<a href=#104 id=104 data-nosnippet>104</a> <span class="kw">if let </span><span class="prelude-val">Some</span>(sender) = entry.sender.get() {
<a href=#105 id=105 data-nosnippet>105</a> sender
<a href=#106 id=106 data-nosnippet>106</a> .try_send(RemoteStateMessage::NetworkChange { is_major })
<a href=#107 id=107 data-nosnippet>107</a> .ok();
<a href=#108 id=108 data-nosnippet>108</a> }
<a href=#109 id=109 data-nosnippet>109</a> }
<a href=#110 id=110 data-nosnippet>110</a> }
<a href=#111 id=111 data-nosnippet>111</a>
<a href=#112 id=112 data-nosnippet>112</a> <span class="doccomment">/// Returns the sender for the [`RemoteStateActor`].
<a href=#113 id=113 data-nosnippet>113</a> ///
<a href=#114 id=114 data-nosnippet>114</a> /// If needed a new actor is started on demand.
<a href=#115 id=115 data-nosnippet>115</a> ///
<a href=#116 id=116 data-nosnippet>116</a> /// [`RemoteStateActor`]: remote_state::RemoteStateActor
<a href=#117 id=117 data-nosnippet>117</a> </span><span class="kw">pub</span>(<span class="kw">super</span>) <span class="kw">fn </span>remote_state_actor(<span class="kw-2">&amp;</span><span class="self">self</span>, eid: EndpointId) -&gt; mpsc::Sender&lt;RemoteStateMessage&gt; {
<a href=#118 id=118 data-nosnippet>118</a> <span class="kw">let </span><span class="kw-2">mut </span>handles = <span class="self">self</span>.actor_handles.lock().expect(<span class="string">"poisoned"</span>);
<a href=#119 id=119 data-nosnippet>119</a> <span class="kw">match </span>handles.entry(eid) {
<a href=#120 id=120 data-nosnippet>120</a> hash_map::Entry::Occupied(<span class="kw-2">mut </span>entry) =&gt; {
<a href=#121 id=121 data-nosnippet>121</a> <span class="kw">if let </span><span class="prelude-val">Some</span>(sender) = entry.get().sender.get() {
<a href=#122 id=122 data-nosnippet>122</a> sender
<a href=#123 id=123 data-nosnippet>123</a> } <span class="kw">else </span>{
<a href=#124 id=124 data-nosnippet>124</a> <span class="comment">// The actor is dead: Start a new actor.
<a href=#125 id=125 data-nosnippet>125</a> </span><span class="kw">let </span>(handle, sender) = <span class="self">self</span>.start_remote_state_actor(eid);
<a href=#126 id=126 data-nosnippet>126</a> entry.insert(handle);
<a href=#127 id=127 data-nosnippet>127</a> sender
<a href=#128 id=128 data-nosnippet>128</a> }
<a href=#129 id=129 data-nosnippet>129</a> }
<a href=#130 id=130 data-nosnippet>130</a> hash_map::Entry::Vacant(entry) =&gt; {
<a href=#131 id=131 data-nosnippet>131</a> <span class="kw">let </span>(handle, sender) = <span class="self">self</span>.start_remote_state_actor(eid);
<a href=#132 id=132 data-nosnippet>132</a> entry.insert(handle);
<a href=#133 id=133 data-nosnippet>133</a> sender
<a href=#134 id=134 data-nosnippet>134</a> }
<a href=#135 id=135 data-nosnippet>135</a> }
<a href=#136 id=136 data-nosnippet>136</a> }
<a href=#137 id=137 data-nosnippet>137</a>
<a href=#138 id=138 data-nosnippet>138</a> <span class="doccomment">/// Starts a new remote state actor and returns a handle and a sender.
<a href=#139 id=139 data-nosnippet>139</a> ///
<a href=#140 id=140 data-nosnippet>140</a> /// The handle is not inserted into the endpoint map, this must be done by the caller of this function.
<a href=#141 id=141 data-nosnippet>141</a> </span><span class="kw">fn </span>start_remote_state_actor(
<a href=#142 id=142 data-nosnippet>142</a> <span class="kw-2">&amp;</span><span class="self">self</span>,
<a href=#143 id=143 data-nosnippet>143</a> eid: EndpointId,
<a href=#144 id=144 data-nosnippet>144</a> ) -&gt; (RemoteStateHandle, mpsc::Sender&lt;RemoteStateMessage&gt;) {
<a href=#145 id=145 data-nosnippet>145</a> <span class="comment">// Ensure there is a RemoteMappedAddr for this EndpointId.
<a href=#146 id=146 data-nosnippet>146</a> </span><span class="self">self</span>.endpoint_mapped_addrs.get(<span class="kw-2">&amp;</span>eid);
<a href=#147 id=147 data-nosnippet>147</a> <span class="kw">let </span>handle = RemoteStateActor::new(
<a href=#148 id=148 data-nosnippet>148</a> eid,
<a href=#149 id=149 data-nosnippet>149</a> <span class="self">self</span>.local_endpoint_id,
<a href=#150 id=150 data-nosnippet>150</a> <span class="self">self</span>.local_direct_addrs.clone(),
<a href=#151 id=151 data-nosnippet>151</a> <span class="self">self</span>.relay_mapped_addrs.clone(),
<a href=#152 id=152 data-nosnippet>152</a> <span class="self">self</span>.metrics.clone(),
<a href=#153 id=153 data-nosnippet>153</a> <span class="self">self</span>.discovery.clone(),
<a href=#154 id=154 data-nosnippet>154</a> )
<a href=#155 id=155 data-nosnippet>155</a> .start(<span class="self">self</span>.shutdown_token.child_token());
<a href=#156 id=156 data-nosnippet>156</a> <span class="kw">let </span>sender = handle.sender.get().expect(<span class="string">"just created"</span>);
<a href=#157 id=157 data-nosnippet>157</a> (handle, sender)
<a href=#158 id=158 data-nosnippet>158</a> }
<a href=#159 id=159 data-nosnippet>159</a>}
<a href=#160 id=160 data-nosnippet>160</a>
<a href=#161 id=161 data-nosnippet>161</a><span class="doccomment">/// The origin or *source* through which an address associated with a remote endpoint
<a href=#162 id=162 data-nosnippet>162</a>/// was discovered.
<a href=#163 id=163 data-nosnippet>163</a>///
<a href=#164 id=164 data-nosnippet>164</a>/// An aggregate of the [`Source`]s of all the addresses of an endpoint describe the
<a href=#165 id=165 data-nosnippet>165</a>/// [`Source`]s of the endpoint itself.
<a href=#166 id=166 data-nosnippet>166</a>///
<a href=#167 id=167 data-nosnippet>167</a>/// A [`Source`] helps track how and where an address was learned. Multiple
<a href=#168 id=168 data-nosnippet>168</a>/// sources can be associated with a single address, if we have discovered this
<a href=#169 id=169 data-nosnippet>169</a>/// address through multiple means.
<a href=#170 id=170 data-nosnippet>170</a></span><span class="attr">#[derive(Serialize, Deserialize, strum::Display, Debug, Clone, Eq, PartialEq, Hash)]
<a href=#171 id=171 data-nosnippet>171</a>#[strum(serialize_all = <span class="string">"kebab-case"</span>)]
<a href=#172 id=172 data-nosnippet>172</a>#[allow(private_interfaces)]
<a href=#173 id=173 data-nosnippet>173</a></span><span class="kw">pub enum </span>Source {
<a href=#174 id=174 data-nosnippet>174</a> <span class="doccomment">/// An endpoint communicated with us first via UDP.
<a href=#175 id=175 data-nosnippet>175</a> </span>Udp,
<a href=#176 id=176 data-nosnippet>176</a> <span class="doccomment">/// An endpoint communicated with us first via relay.
<a href=#177 id=177 data-nosnippet>177</a> </span>Relay,
<a href=#178 id=178 data-nosnippet>178</a> <span class="doccomment">/// Application layer added the address directly.
<a href=#179 id=179 data-nosnippet>179</a> </span>App,
<a href=#180 id=180 data-nosnippet>180</a> <span class="doccomment">/// The address was discovered by a discovery service.
<a href=#181 id=181 data-nosnippet>181</a> </span><span class="attr">#[strum(serialize = <span class="string">"{name}"</span>)]
<a href=#182 id=182 data-nosnippet>182</a> </span>Discovery {
<a href=#183 id=183 data-nosnippet>183</a> <span class="doccomment">/// The name of the discovery service that discovered the address.
<a href=#184 id=184 data-nosnippet>184</a> </span>name: String,
<a href=#185 id=185 data-nosnippet>185</a> },
<a href=#186 id=186 data-nosnippet>186</a> <span class="doccomment">/// Application layer with a specific name added the endpoint directly.
<a href=#187 id=187 data-nosnippet>187</a> </span><span class="attr">#[strum(serialize = <span class="string">"{name}"</span>)]
<a href=#188 id=188 data-nosnippet>188</a> </span>NamedApp {
<a href=#189 id=189 data-nosnippet>189</a> <span class="doccomment">/// The name of the application that added the endpoint
<a href=#190 id=190 data-nosnippet>190</a> </span>name: String,
<a href=#191 id=191 data-nosnippet>191</a> },
<a href=#192 id=192 data-nosnippet>192</a> <span class="doccomment">/// The address was advertised by a call-me-maybe DISCO message.
<a href=#193 id=193 data-nosnippet>193</a> </span><span class="attr">#[strum(serialize = <span class="string">"CallMeMaybe"</span>)]
<a href=#194 id=194 data-nosnippet>194</a> </span>CallMeMaybe {
<a href=#195 id=195 data-nosnippet>195</a> <span class="doccomment">/// private marker
<a href=#196 id=196 data-nosnippet>196</a> </span>_0: Private,
<a href=#197 id=197 data-nosnippet>197</a> },
<a href=#198 id=198 data-nosnippet>198</a> <span class="doccomment">/// We received a ping on the path.
<a href=#199 id=199 data-nosnippet>199</a> </span><span class="attr">#[strum(serialize = <span class="string">"Ping"</span>)]
<a href=#200 id=200 data-nosnippet>200</a> </span>Ping {
<a href=#201 id=201 data-nosnippet>201</a> <span class="doccomment">/// private marker
<a href=#202 id=202 data-nosnippet>202</a> </span>_0: Private,
<a href=#203 id=203 data-nosnippet>203</a> },
<a href=#204 id=204 data-nosnippet>204</a> <span class="doccomment">/// We established a connection on this address.
<a href=#205 id=205 data-nosnippet>205</a> </span><span class="attr">#[strum(serialize = <span class="string">"Connection"</span>)]
<a href=#206 id=206 data-nosnippet>206</a> </span>Connection {
<a href=#207 id=207 data-nosnippet>207</a> <span class="doccomment">/// private marker
<a href=#208 id=208 data-nosnippet>208</a> </span>_0: Private,
<a href=#209 id=209 data-nosnippet>209</a> },
<a href=#210 id=210 data-nosnippet>210</a>}
<a href=#211 id=211 data-nosnippet>211</a>
<a href=#212 id=212 data-nosnippet>212</a><span class="doccomment">/// Helper to ensure certain `Source` variants can not be constructed externally.
<a href=#213 id=213 data-nosnippet>213</a></span><span class="attr">#[derive(Serialize, Deserialize, Debug, Clone, Copy, Eq, PartialEq, Hash)]
<a href=#214 id=214 data-nosnippet>214</a></span><span class="kw">struct </span>Private;
<a href=#215 id=215 data-nosnippet>215</a>
<a href=#216 id=216 data-nosnippet>216</a><span class="doccomment">/// An (Ip, Port) pair.
<a href=#217 id=217 data-nosnippet>217</a>///
<a href=#218 id=218 data-nosnippet>218</a>/// NOTE: storing an [`IpPort`] is safer than storing a [`SocketAddr`] because for IPv6 socket
<a href=#219 id=219 data-nosnippet>219</a>/// addresses include fields that can't be assumed consistent even within a single connection.
<a href=#220 id=220 data-nosnippet>220</a></span><span class="attr">#[derive(Debug, derive_more::Display, Clone, Copy, Hash, PartialEq, Eq, PartialOrd, Ord)]
<a href=#221 id=221 data-nosnippet>221</a>#[display(<span class="string">"{}"</span>, SocketAddr::from(<span class="kw-2">*</span><span class="self">self</span>))]
<a href=#222 id=222 data-nosnippet>222</a></span><span class="kw">pub struct </span>IpPort {
<a href=#223 id=223 data-nosnippet>223</a> ip: IpAddr,
<a href=#224 id=224 data-nosnippet>224</a> port: u16,
<a href=#225 id=225 data-nosnippet>225</a>}
<a href=#138 id=138 data-nosnippet>138</a> <span class="kw">pub</span>(<span class="kw">super</span>) <span class="kw">fn </span>remote_state_actor_if_exists(
<a href=#139 id=139 data-nosnippet>139</a> <span class="kw-2">&amp;</span><span class="self">self</span>,
<a href=#140 id=140 data-nosnippet>140</a> eid: EndpointId,
<a href=#141 id=141 data-nosnippet>141</a> ) -&gt; <span class="prelude-ty">Option</span>&lt;mpsc::Sender&lt;RemoteStateMessage&gt;&gt; {
<a href=#142 id=142 data-nosnippet>142</a> <span class="self">self</span>.actor_handles
<a href=#143 id=143 data-nosnippet>143</a> .lock()
<a href=#144 id=144 data-nosnippet>144</a> .expect(<span class="string">"poisoned"</span>)
<a href=#145 id=145 data-nosnippet>145</a> .get(<span class="kw-2">&amp;</span>eid)
<a href=#146 id=146 data-nosnippet>146</a> .and_then(|handle| handle.sender.get())
<a href=#147 id=147 data-nosnippet>147</a> }
<a href=#148 id=148 data-nosnippet>148</a>
<a href=#149 id=149 data-nosnippet>149</a> <span class="doccomment">/// Starts a new remote state actor and returns a handle and a sender.
<a href=#150 id=150 data-nosnippet>150</a> ///
<a href=#151 id=151 data-nosnippet>151</a> /// The handle is not inserted into the endpoint map, this must be done by the caller of this function.
<a href=#152 id=152 data-nosnippet>152</a> </span><span class="kw">fn </span>start_remote_state_actor(
<a href=#153 id=153 data-nosnippet>153</a> <span class="kw-2">&amp;</span><span class="self">self</span>,
<a href=#154 id=154 data-nosnippet>154</a> eid: EndpointId,
<a href=#155 id=155 data-nosnippet>155</a> ) -&gt; (RemoteStateHandle, mpsc::Sender&lt;RemoteStateMessage&gt;) {
<a href=#156 id=156 data-nosnippet>156</a> <span class="comment">// Ensure there is a RemoteMappedAddr for this EndpointId.
<a href=#157 id=157 data-nosnippet>157</a> </span><span class="self">self</span>.endpoint_mapped_addrs.get(<span class="kw-2">&amp;</span>eid);
<a href=#158 id=158 data-nosnippet>158</a> <span class="kw">let </span>handle = RemoteStateActor::new(
<a href=#159 id=159 data-nosnippet>159</a> eid,
<a href=#160 id=160 data-nosnippet>160</a> <span class="self">self</span>.local_endpoint_id,
<a href=#161 id=161 data-nosnippet>161</a> <span class="self">self</span>.local_direct_addrs.clone(),
<a href=#162 id=162 data-nosnippet>162</a> <span class="self">self</span>.relay_mapped_addrs.clone(),
<a href=#163 id=163 data-nosnippet>163</a> <span class="self">self</span>.metrics.clone(),
<a href=#164 id=164 data-nosnippet>164</a> <span class="self">self</span>.discovery.clone(),
<a href=#165 id=165 data-nosnippet>165</a> )
<a href=#166 id=166 data-nosnippet>166</a> .start(<span class="self">self</span>.shutdown_token.child_token());
<a href=#167 id=167 data-nosnippet>167</a> <span class="kw">let </span>sender = handle.sender.get().expect(<span class="string">"just created"</span>);
<a href=#168 id=168 data-nosnippet>168</a> (handle, sender)
<a href=#169 id=169 data-nosnippet>169</a> }
<a href=#170 id=170 data-nosnippet>170</a>}
<a href=#171 id=171 data-nosnippet>171</a>
<a href=#172 id=172 data-nosnippet>172</a><span class="doccomment">/// The origin or *source* through which an address associated with a remote endpoint
<a href=#173 id=173 data-nosnippet>173</a>/// was discovered.
<a href=#174 id=174 data-nosnippet>174</a>///
<a href=#175 id=175 data-nosnippet>175</a>/// An aggregate of the [`Source`]s of all the addresses of an endpoint describe the
<a href=#176 id=176 data-nosnippet>176</a>/// [`Source`]s of the endpoint itself.
<a href=#177 id=177 data-nosnippet>177</a>///
<a href=#178 id=178 data-nosnippet>178</a>/// A [`Source`] helps track how and where an address was learned. Multiple
<a href=#179 id=179 data-nosnippet>179</a>/// sources can be associated with a single address, if we have discovered this
<a href=#180 id=180 data-nosnippet>180</a>/// address through multiple means.
<a href=#181 id=181 data-nosnippet>181</a></span><span class="attr">#[derive(Serialize, Deserialize, strum::Display, Debug, Clone, Eq, PartialEq, Hash)]
<a href=#182 id=182 data-nosnippet>182</a>#[strum(serialize_all = <span class="string">"kebab-case"</span>)]
<a href=#183 id=183 data-nosnippet>183</a>#[allow(private_interfaces)]
<a href=#184 id=184 data-nosnippet>184</a></span><span class="kw">pub enum </span>Source {
<a href=#185 id=185 data-nosnippet>185</a> <span class="doccomment">/// An endpoint communicated with us first via UDP.
<a href=#186 id=186 data-nosnippet>186</a> </span>Udp,
<a href=#187 id=187 data-nosnippet>187</a> <span class="doccomment">/// An endpoint communicated with us first via relay.
<a href=#188 id=188 data-nosnippet>188</a> </span>Relay,
<a href=#189 id=189 data-nosnippet>189</a> <span class="doccomment">/// Application layer added the address directly.
<a href=#190 id=190 data-nosnippet>190</a> </span>App,
<a href=#191 id=191 data-nosnippet>191</a> <span class="doccomment">/// The address was discovered by a discovery service.
<a href=#192 id=192 data-nosnippet>192</a> </span><span class="attr">#[strum(serialize = <span class="string">"{name}"</span>)]
<a href=#193 id=193 data-nosnippet>193</a> </span>Discovery {
<a href=#194 id=194 data-nosnippet>194</a> <span class="doccomment">/// The name of the discovery service that discovered the address.
<a href=#195 id=195 data-nosnippet>195</a> </span>name: String,
<a href=#196 id=196 data-nosnippet>196</a> },
<a href=#197 id=197 data-nosnippet>197</a> <span class="doccomment">/// Application layer with a specific name added the endpoint directly.
<a href=#198 id=198 data-nosnippet>198</a> </span><span class="attr">#[strum(serialize = <span class="string">"{name}"</span>)]
<a href=#199 id=199 data-nosnippet>199</a> </span>NamedApp {
<a href=#200 id=200 data-nosnippet>200</a> <span class="doccomment">/// The name of the application that added the endpoint
<a href=#201 id=201 data-nosnippet>201</a> </span>name: String,
<a href=#202 id=202 data-nosnippet>202</a> },
<a href=#203 id=203 data-nosnippet>203</a> <span class="doccomment">/// The address was advertised by a call-me-maybe DISCO message.
<a href=#204 id=204 data-nosnippet>204</a> </span><span class="attr">#[strum(serialize = <span class="string">"CallMeMaybe"</span>)]
<a href=#205 id=205 data-nosnippet>205</a> </span>CallMeMaybe {
<a href=#206 id=206 data-nosnippet>206</a> <span class="doccomment">/// private marker
<a href=#207 id=207 data-nosnippet>207</a> </span>_0: Private,
<a href=#208 id=208 data-nosnippet>208</a> },
<a href=#209 id=209 data-nosnippet>209</a> <span class="doccomment">/// We received a ping on the path.
<a href=#210 id=210 data-nosnippet>210</a> </span><span class="attr">#[strum(serialize = <span class="string">"Ping"</span>)]
<a href=#211 id=211 data-nosnippet>211</a> </span>Ping {
<a href=#212 id=212 data-nosnippet>212</a> <span class="doccomment">/// private marker
<a href=#213 id=213 data-nosnippet>213</a> </span>_0: Private,
<a href=#214 id=214 data-nosnippet>214</a> },
<a href=#215 id=215 data-nosnippet>215</a> <span class="doccomment">/// We established a connection on this address.
<a href=#216 id=216 data-nosnippet>216</a> </span><span class="attr">#[strum(serialize = <span class="string">"Connection"</span>)]
<a href=#217 id=217 data-nosnippet>217</a> </span>Connection {
<a href=#218 id=218 data-nosnippet>218</a> <span class="doccomment">/// private marker
<a href=#219 id=219 data-nosnippet>219</a> </span>_0: Private,
<a href=#220 id=220 data-nosnippet>220</a> },
<a href=#221 id=221 data-nosnippet>221</a>}
<a href=#222 id=222 data-nosnippet>222</a>
<a href=#223 id=223 data-nosnippet>223</a><span class="doccomment">/// Helper to ensure certain `Source` variants can not be constructed externally.
<a href=#224 id=224 data-nosnippet>224</a></span><span class="attr">#[derive(Serialize, Deserialize, Debug, Clone, Copy, Eq, PartialEq, Hash)]
<a href=#225 id=225 data-nosnippet>225</a></span><span class="kw">struct </span>Private;
<a href=#226 id=226 data-nosnippet>226</a>
<a href=#227 id=227 data-nosnippet>227</a><span class="kw">impl </span>From&lt;SocketAddr&gt; <span class="kw">for </span>IpPort {
<a href=#228 id=228 data-nosnippet>228</a> <span class="kw">fn </span>from(socket_addr: SocketAddr) -&gt; <span class="self">Self </span>{
<a href=#229 id=229 data-nosnippet>229</a> <span class="self">Self </span>{
<a href=#230 id=230 data-nosnippet>230</a> ip: socket_addr.ip(),
<a href=#231 id=231 data-nosnippet>231</a> port: socket_addr.port(),
<a href=#232 id=232 data-nosnippet>232</a> }
<a href=#233 id=233 data-nosnippet>233</a> }
<a href=#234 id=234 data-nosnippet>234</a>}
<a href=#235 id=235 data-nosnippet>235</a>
<a href=#236 id=236 data-nosnippet>236</a><span class="kw">impl </span>From&lt;IpPort&gt; <span class="kw">for </span>SocketAddr {
<a href=#237 id=237 data-nosnippet>237</a> <span class="kw">fn </span>from(ip_port: IpPort) -&gt; <span class="self">Self </span>{
<a href=#238 id=238 data-nosnippet>238</a> <span class="kw">let </span>IpPort { ip, port } = ip_port;
<a href=#239 id=239 data-nosnippet>239</a> (ip, port).into()
<a href=#240 id=240 data-nosnippet>240</a> }
<a href=#241 id=241 data-nosnippet>241</a>}
<a href=#242 id=242 data-nosnippet>242</a>
<a href=#243 id=243 data-nosnippet>243</a><span class="kw">impl </span>IpPort {
<a href=#244 id=244 data-nosnippet>244</a> <span class="kw">pub fn </span>ip(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;</span>IpAddr {
<a href=#245 id=245 data-nosnippet>245</a> <span class="kw-2">&amp;</span><span class="self">self</span>.ip
<a href=#246 id=246 data-nosnippet>246</a> }
<a href=#247 id=247 data-nosnippet>247</a>
<a href=#248 id=248 data-nosnippet>248</a> <span class="kw">pub fn </span>port(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; u16 {
<a href=#249 id=249 data-nosnippet>249</a> <span class="self">self</span>.port
<a href=#250 id=250 data-nosnippet>250</a> }
<a href=#251 id=251 data-nosnippet>251</a>}</code></pre></div></section></main></body></html>
<a href=#227 id=227 data-nosnippet>227</a><span class="doccomment">/// An (Ip, Port) pair.
<a href=#228 id=228 data-nosnippet>228</a>///
<a href=#229 id=229 data-nosnippet>229</a>/// NOTE: storing an [`IpPort`] is safer than storing a [`SocketAddr`] because for IPv6 socket
<a href=#230 id=230 data-nosnippet>230</a>/// addresses include fields that can't be assumed consistent even within a single connection.
<a href=#231 id=231 data-nosnippet>231</a></span><span class="attr">#[derive(Debug, derive_more::Display, Clone, Copy, Hash, PartialEq, Eq, PartialOrd, Ord)]
<a href=#232 id=232 data-nosnippet>232</a>#[display(<span class="string">"{}"</span>, SocketAddr::from(<span class="kw-2">*</span><span class="self">self</span>))]
<a href=#233 id=233 data-nosnippet>233</a></span><span class="kw">pub struct </span>IpPort {
<a href=#234 id=234 data-nosnippet>234</a> ip: IpAddr,
<a href=#235 id=235 data-nosnippet>235</a> port: u16,
<a href=#236 id=236 data-nosnippet>236</a>}
<a href=#237 id=237 data-nosnippet>237</a>
<a href=#238 id=238 data-nosnippet>238</a><span class="kw">impl </span>From&lt;SocketAddr&gt; <span class="kw">for </span>IpPort {
<a href=#239 id=239 data-nosnippet>239</a> <span class="kw">fn </span>from(socket_addr: SocketAddr) -&gt; <span class="self">Self </span>{
<a href=#240 id=240 data-nosnippet>240</a> <span class="self">Self </span>{
<a href=#241 id=241 data-nosnippet>241</a> ip: socket_addr.ip(),
<a href=#242 id=242 data-nosnippet>242</a> port: socket_addr.port(),
<a href=#243 id=243 data-nosnippet>243</a> }
<a href=#244 id=244 data-nosnippet>244</a> }
<a href=#245 id=245 data-nosnippet>245</a>}
<a href=#246 id=246 data-nosnippet>246</a>
<a href=#247 id=247 data-nosnippet>247</a><span class="kw">impl </span>From&lt;IpPort&gt; <span class="kw">for </span>SocketAddr {
<a href=#248 id=248 data-nosnippet>248</a> <span class="kw">fn </span>from(ip_port: IpPort) -&gt; <span class="self">Self </span>{
<a href=#249 id=249 data-nosnippet>249</a> <span class="kw">let </span>IpPort { ip, port } = ip_port;
<a href=#250 id=250 data-nosnippet>250</a> (ip, port).into()
<a href=#251 id=251 data-nosnippet>251</a> }
<a href=#252 id=252 data-nosnippet>252</a>}
<a href=#253 id=253 data-nosnippet>253</a>
<a href=#254 id=254 data-nosnippet>254</a><span class="kw">impl </span>IpPort {
<a href=#255 id=255 data-nosnippet>255</a> <span class="kw">pub fn </span>ip(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;</span>IpAddr {
<a href=#256 id=256 data-nosnippet>256</a> <span class="kw-2">&amp;</span><span class="self">self</span>.ip
<a href=#257 id=257 data-nosnippet>257</a> }
<a href=#258 id=258 data-nosnippet>258</a>
<a href=#259 id=259 data-nosnippet>259</a> <span class="kw">pub fn </span>port(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; u16 {
<a href=#260 id=260 data-nosnippet>260</a> <span class="self">self</span>.port
<a href=#261 id=261 data-nosnippet>261</a> }
<a href=#262 id=262 data-nosnippet>262</a>}</code></pre></div></section></main></body></html>
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
@@ -1,9 +1,9 @@
(function() {
var implementors = Object.fromEntries([["iroh_relay",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.FromIterator.html\" title=\"trait core::iter::traits::collect::FromIterator\">FromIterator</a>&lt;<a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html\" title=\"struct alloc::boxed::Box\">Box</a>&lt;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]&gt;&gt; for <a class=\"struct\" href=\"iroh_relay/dns/struct.TxtRecordData.html\" title=\"struct iroh_relay::dns::TxtRecordData\">TxtRecordData</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.FromIterator.html\" title=\"trait core::iter::traits::collect::FromIterator\">FromIterator</a>&lt;<a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/alloc/sync/struct.Arc.html\" title=\"struct alloc::sync::Arc\">Arc</a>&lt;<a class=\"struct\" href=\"iroh_relay/struct.RelayConfig.html\" title=\"struct iroh_relay::RelayConfig\">RelayConfig</a>&gt;&gt; for <a class=\"struct\" href=\"iroh_relay/struct.RelayMap.html\" title=\"struct iroh_relay::RelayMap\">RelayMap</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.FromIterator.html\" title=\"trait core::iter::traits::collect::FromIterator\">FromIterator</a>&lt;<a class=\"struct\" href=\"iroh_base/relay_url/struct.RelayUrl.html\" title=\"struct iroh_base::relay_url::RelayUrl\">RelayUrl</a>&gt; for <a class=\"struct\" href=\"iroh_relay/struct.RelayMap.html\" title=\"struct iroh_relay::RelayMap\">RelayMap</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.FromIterator.html\" title=\"trait core::iter::traits::collect::FromIterator\">FromIterator</a>&lt;<a class=\"struct\" href=\"iroh_relay/struct.RelayConfig.html\" title=\"struct iroh_relay::RelayConfig\">RelayConfig</a>&gt; for <a class=\"struct\" href=\"iroh_relay/struct.RelayMap.html\" title=\"struct iroh_relay::RelayMap\">RelayMap</a>"]]]]);
var implementors = Object.fromEntries([["iroh_relay",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.FromIterator.html\" title=\"trait core::iter::traits::collect::FromIterator\">FromIterator</a>&lt;<a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html\" title=\"struct alloc::boxed::Box\">Box</a>&lt;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]&gt;&gt; for <a class=\"struct\" href=\"iroh_relay/dns/struct.TxtRecordData.html\" title=\"struct iroh_relay::dns::TxtRecordData\">TxtRecordData</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.FromIterator.html\" title=\"trait core::iter::traits::collect::FromIterator\">FromIterator</a>&lt;<a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/alloc/sync/struct.Arc.html\" title=\"struct alloc::sync::Arc\">Arc</a>&lt;<a class=\"struct\" href=\"iroh_relay/struct.RelayConfig.html\" title=\"struct iroh_relay::RelayConfig\">RelayConfig</a>&gt;&gt; for <a class=\"struct\" href=\"iroh_relay/struct.RelayMap.html\" title=\"struct iroh_relay::RelayMap\">RelayMap</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.FromIterator.html\" title=\"trait core::iter::traits::collect::FromIterator\">FromIterator</a>&lt;<a class=\"struct\" href=\"iroh_relay/struct.RelayConfig.html\" title=\"struct iroh_relay::RelayConfig\">RelayConfig</a>&gt; for <a class=\"struct\" href=\"iroh_relay/struct.RelayMap.html\" title=\"struct iroh_relay::RelayMap\">RelayMap</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.FromIterator.html\" title=\"trait core::iter::traits::collect::FromIterator\">FromIterator</a>&lt;RelayUrl&gt; for <a class=\"struct\" href=\"iroh_relay/struct.RelayMap.html\" title=\"struct iroh_relay::RelayMap\">RelayMap</a>"]]]]);
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()
//{"start":57,"fragment_lengths":[2062]}
//{"start":57,"fragment_lengths":[1940]}