deploy: 0d0ad35dbdecfa1f3b3d839a488fb2676caae606

This commit is contained in:
dignifiedquire
2025-04-29 13:01:59 +00:00
parent c37ae695d0
commit df376fa976
34 changed files with 271 additions and 231 deletions
@@ -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="Environment variable to force the use of staging relays."><title>ENV_FORCE_STAGING_RELAYS in iroh::endpoint - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-dbdb5eec.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh" data-themes="" data-resource-suffix="" data-rustdoc-version="1.85.0-nightly (d10a6823f 2024-11-29)" data-channel="nightly" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh/index.html">iroh</a><span class="version">0.34.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In iroh::<wbr>endpoint</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">iroh</a>::<wbr><a href="index.html">endpoint</a></span><h1>Constant <span class="constant">ENV_FORCE_STAGING_RELAYS</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/iroh/endpoint.rs.html#1995">Source</a> </span></div><pre class="rust item-decl"><code>pub const ENV_FORCE_STAGING_RELAYS: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = &quot;IROH_FORCE_STAGING_RELAYS&quot;;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Environment variable to force the use of staging relays.</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="Environment variable to force the use of staging relays."><title>ENV_FORCE_STAGING_RELAYS in iroh::endpoint - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-dbdb5eec.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh" data-themes="" data-resource-suffix="" data-rustdoc-version="1.85.0-nightly (d10a6823f 2024-11-29)" data-channel="nightly" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh/index.html">iroh</a><span class="version">0.34.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In iroh::<wbr>endpoint</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">iroh</a>::<wbr><a href="index.html">endpoint</a></span><h1>Constant <span class="constant">ENV_FORCE_STAGING_RELAYS</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/iroh/endpoint.rs.html#2007">Source</a> </span></div><pre class="rust item-decl"><code>pub const ENV_FORCE_STAGING_RELAYS: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = &quot;IROH_FORCE_STAGING_RELAYS&quot;;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Environment variable to force the use of staging relays.</p>
</div></details></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,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="Returns the default relay mode."><title>default_relay_mode in iroh::endpoint - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-dbdb5eec.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh" data-themes="" data-resource-suffix="" data-rustdoc-version="1.85.0-nightly (d10a6823f 2024-11-29)" data-channel="nightly" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh/index.html">iroh</a><span class="version">0.34.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In iroh::<wbr>endpoint</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">iroh</a>::<wbr><a href="index.html">endpoint</a></span><h1>Function <span class="fn">default_relay_mode</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/iroh/endpoint.rs.html#2006-2012">Source</a> </span></div><pre class="rust item-decl"><code>pub fn default_relay_mode() -&gt; <a class="enum" href="enum.RelayMode.html" title="enum iroh::endpoint::RelayMode">RelayMode</a></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Returns the default relay mode.</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="Returns the default relay mode."><title>default_relay_mode in iroh::endpoint - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-dbdb5eec.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh" data-themes="" data-resource-suffix="" data-rustdoc-version="1.85.0-nightly (d10a6823f 2024-11-29)" data-channel="nightly" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh/index.html">iroh</a><span class="version">0.34.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In iroh::<wbr>endpoint</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">iroh</a>::<wbr><a href="index.html">endpoint</a></span><h1>Function <span class="fn">default_relay_mode</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/iroh/endpoint.rs.html#2018-2024">Source</a> </span></div><pre class="rust item-decl"><code>pub fn default_relay_mode() -&gt; <a class="enum" href="enum.RelayMode.html" title="enum iroh::endpoint::RelayMode">RelayMode</a></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Returns the default relay mode.</p>
<p>If the <code>IROH_FORCE_STAGING_RELAYS</code> environment variable is non empty, it will return <code>RelayMode::Staging</code>.
Otherwise, it will return <code>RelayMode::Default</code>.</p>
</div></details></section></div></main></body></html>
@@ -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="Returns `true` if the use of staging relays is forced."><title>force_staging_infra in iroh::endpoint - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-dbdb5eec.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh" data-themes="" data-resource-suffix="" data-rustdoc-version="1.85.0-nightly (d10a6823f 2024-11-29)" data-channel="nightly" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh/index.html">iroh</a><span class="version">0.34.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In iroh::<wbr>endpoint</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">iroh</a>::<wbr><a href="index.html">endpoint</a></span><h1>Function <span class="fn">force_staging_infra</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/iroh/endpoint.rs.html#1998-2000">Source</a> </span></div><pre class="rust item-decl"><code>pub fn force_staging_infra() -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Returns <code>true</code> if the use of staging relays is forced.</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="Returns `true` if the use of staging relays is forced."><title>force_staging_infra in iroh::endpoint - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-dbdb5eec.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh" data-themes="" data-resource-suffix="" data-rustdoc-version="1.85.0-nightly (d10a6823f 2024-11-29)" data-channel="nightly" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh/index.html">iroh</a><span class="version">0.34.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In iroh::<wbr>endpoint</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">iroh</a>::<wbr><a href="index.html">endpoint</a></span><h1>Function <span class="fn">force_staging_infra</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/iroh/endpoint.rs.html#2010-2012">Source</a> </span></div><pre class="rust item-decl"><code>pub fn force_staging_infra() -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Returns <code>true</code> if the use of staging relays is forced.</p>
</div></details></section></div></main></body></html>
+1 -1
View File
@@ -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="The `Endpoint` allows establishing connections to other iroh nodes."><title>iroh::endpoint - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-dbdb5eec.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh" data-themes="" data-resource-suffix="" data-rustdoc-version="1.85.0-nightly (d10a6823f 2024-11-29)" data-channel="nightly" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh/index.html">iroh</a><span class="version">0.34.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module endpoint</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><li><a href="#functions" title="Functions">Functions</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate iroh</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">iroh</a></span><h1>Module <span>endpoint</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/iroh/endpoint.rs.html#1-2782">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The <a href="struct.Endpoint.html" title="struct iroh::endpoint::Endpoint"><code>Endpoint</code></a> allows establishing connections to other iroh nodes.</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="The `Endpoint` allows establishing connections to other iroh nodes."><title>iroh::endpoint - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-dbdb5eec.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh" data-themes="" data-resource-suffix="" data-rustdoc-version="1.85.0-nightly (d10a6823f 2024-11-29)" data-channel="nightly" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh/index.html">iroh</a><span class="version">0.34.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module endpoint</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><li><a href="#functions" title="Functions">Functions</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate iroh</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">iroh</a></span><h1>Module <span>endpoint</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/iroh/endpoint.rs.html#1-2797">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The <a href="struct.Endpoint.html" title="struct iroh::endpoint::Endpoint"><code>Endpoint</code></a> allows establishing connections to other iroh nodes.</p>
<p>The <a href="struct.Endpoint.html" title="struct iroh::endpoint::Endpoint"><code>Endpoint</code></a> is the main API interface to manage a local iroh node. It allows
connecting to and accepting connections from other nodes. See the <a href="../index.html" title="mod iroh">module docs</a> for
more details on how iroh connections work.</p>
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
File diff suppressed because one or more lines are too long
@@ -67,9 +67,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_node_by_id" class="method"><a class="src rightside" href="../../src/iroh_relay/dns.rs.html#260-271">Source</a><h4 class="code-header">pub async fn <a href="#method.lookup_node_by_id" class="fn">lookup_node_by_id</a>(
&amp;self,
node_id: &amp;NodeId,
node_id: &amp;<a class="type" href="../../iroh_base/key/type.NodeId.html" title="type iroh_base::key::NodeId">NodeId</a>,
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="../node_info/struct.NodeInfo.html" title="struct iroh_relay::node_info::NodeInfo">NodeInfo</a>, <a class="enum" href="../node_info/enum.Error.html" title="enum iroh_relay::node_info::Error">NodeError</a>&gt;</h4></section></summary><div class="docblock"><p>Looks up node info by [<code>NodeId</code>] 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="../node_info/struct.NodeInfo.html" title="struct iroh_relay::node_info::NodeInfo">NodeInfo</a>, <a class="enum" href="../node_info/enum.Error.html" title="enum iroh_relay::node_info::Error">NodeError</a>&gt;</h4></section></summary><div class="docblock"><p>Looks up node info by <a href="../../iroh_base/key/type.NodeId.html" title="type iroh_base::key::NodeId"><code>NodeId</code></a> and origin domain name.</p>
<p>To lookup nodes that published their node info to the DNS servers run by n0,
pass <a href="constant.N0_DNS_NODE_ORIGIN_PROD.html" title="constant iroh_relay::dns::N0_DNS_NODE_ORIGIN_PROD"><code>N0_DNS_NODE_ORIGIN_PROD</code></a> as <code>origin</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.lookup_node_by_domain_name" class="method"><a class="src rightside" href="../../src/iroh_relay/dns.rs.html#274-280">Source</a><h4 class="code-header">pub async fn <a href="#method.lookup_node_by_domain_name" class="fn">lookup_node_by_domain_name</a>(
@@ -87,10 +87,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_node_by_id_staggered" class="method"><a class="src rightside" href="../../src/iroh_relay/dns.rs.html#305-315">Source</a><h4 class="code-header">pub async fn <a href="#method.lookup_node_by_id_staggered" class="fn">lookup_node_by_id_staggered</a>(
&amp;self,
node_id: &amp;NodeId,
node_id: &amp;<a class="type" href="../../iroh_base/key/type.NodeId.html" title="type iroh_base::key::NodeId">NodeId</a>,
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="../node_info/struct.NodeInfo.html" title="struct iroh_relay::node_info::NodeInfo">NodeInfo</a>, <a class="enum" href="../node_info/enum.Error.html" title="enum iroh_relay::node_info::Error">NodeError</a>&gt;</h4></section></summary><div class="docblock"><p>Looks up node info by [<code>NodeId</code>] 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="../node_info/struct.NodeInfo.html" title="struct iroh_relay::node_info::NodeInfo">NodeInfo</a>, <a class="enum" href="../node_info/enum.Error.html" title="enum iroh_relay::node_info::Error">NodeError</a>&gt;</h4></section></summary><div class="docblock"><p>Looks up node info by <a href="../../iroh_base/key/type.NodeId.html" title="type iroh_base::key::NodeId"><code>NodeId</code></a> 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
+1 -1
View File
@@ -25,6 +25,6 @@ Tailscale.</p>
STUN support and expose metrics.</p>
</li>
</ul>
</div></details><h2 id="reexports" class="section-header">Re-exports<a href="#reexports" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name" 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></div></li></ul><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="mod" href="client/index.html" title="mod iroh_relay::client">client</a></div><div class="desc docblock-short">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.</div></li><li><div class="item-name"><a class="mod" href="defaults/index.html" title="mod iroh_relay::defaults">defaults</a></div><div class="desc docblock-short">Default values used in the relay.</div></li><li><div class="item-name"><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></div><div class="desc docblock-short">DNS resolver</div></li><li><div class="item-name"><a class="mod" href="http/index.html" title="mod iroh_relay::http">http</a></div><div class="desc docblock-short">HTTP-specific constants for the relay server and client.</div></li><li><div class="item-name"><a class="mod" href="node_info/index.html" title="mod iroh_relay::node_info">node_<wbr>info</a></div><div class="desc docblock-short">Support for handling DNS resource records for dialing by [<code>NodeId</code>].</div></li><li><div class="item-name"><a class="mod" href="protos/index.html" title="mod iroh_relay::protos">protos</a></div><div class="desc docblock-short">Protocols used by the iroh-relay</div></li><li><div class="item-name"><a class="mod" href="quic/index.html" title="mod iroh_relay::quic">quic</a></div><div class="desc docblock-short">Create a QUIC server that accepts connections
</div></details><h2 id="reexports" class="section-header">Re-exports<a href="#reexports" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name" 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></div></li></ul><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="mod" href="client/index.html" title="mod iroh_relay::client">client</a></div><div class="desc docblock-short">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.</div></li><li><div class="item-name"><a class="mod" href="defaults/index.html" title="mod iroh_relay::defaults">defaults</a></div><div class="desc docblock-short">Default values used in the relay.</div></li><li><div class="item-name"><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></div><div class="desc docblock-short">DNS resolver</div></li><li><div class="item-name"><a class="mod" href="http/index.html" title="mod iroh_relay::http">http</a></div><div class="desc docblock-short">HTTP-specific constants for the relay server and client.</div></li><li><div class="item-name"><a class="mod" href="node_info/index.html" title="mod iroh_relay::node_info">node_<wbr>info</a></div><div class="desc docblock-short">Support for handling DNS resource records for dialing by <a href="../iroh_base/key/type.NodeId.html" title="type iroh_base::key::NodeId"><code>NodeId</code></a>.</div></li><li><div class="item-name"><a class="mod" href="protos/index.html" title="mod iroh_relay::protos">protos</a></div><div class="desc docblock-short">Protocols used by the iroh-relay</div></li><li><div class="item-name"><a class="mod" href="quic/index.html" title="mod iroh_relay::quic">quic</a></div><div class="desc docblock-short">Create a QUIC server that accepts connections
for QUIC address discovery.</div></li><li><div class="item-name"><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></div><div class="desc docblock-short">A fully-fledged iroh-relay server over HTTP or HTTPS.</div></li></ul><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.PingTracker.html" title="struct iroh_relay::PingTracker">Ping<wbr>Tracker</a></div><div class="desc docblock-short">Tracks pings on a single relay connection.</div></li><li><div class="item-name"><a class="struct" href="struct.RelayMap.html" title="struct iroh_relay::RelayMap">Relay<wbr>Map</a></div><div class="desc docblock-short">Configuration of all the relay servers that can be used.</div></li><li><div class="item-name"><a class="struct" href="struct.RelayNode.html" title="struct iroh_relay::RelayNode">Relay<wbr>Node</a></div><div class="desc docblock-short">Information on a specific relay server.</div></li><li><div class="item-name"><a class="struct" href="struct.RelayQuicConfig.html" title="struct iroh_relay::RelayQuicConfig">Relay<wbr>Quic<wbr>Config</a></div><div class="desc docblock-short">Configuration for speaking to the QUIC endpoint on the relay
server to do QUIC address discovery.</div></li></ul></section></div></main></body></html>
+5 -5
View File
@@ -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 `NodeId`."><title>iroh_relay::node_info - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-dbdb5eec.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh_relay" data-themes="" data-resource-suffix="" data-rustdoc-version="1.85.0-nightly (d10a6823f 2024-11-29)" data-channel="nightly" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh_relay/index.html">iroh_<wbr>relay</a><span class="version">0.34.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module node_<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"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">iroh_relay</a></span><h1>Module <span>node_info</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/iroh_relay/node_info.rs.html#1-792">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>NodeId</code>].</p>
<p>Dialing by [<code>NodeId</code>] is supported by iroh nodes 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 `NodeId`."><title>iroh_relay::node_info - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-dbdb5eec.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh_relay" data-themes="" data-resource-suffix="" data-rustdoc-version="1.85.0-nightly (d10a6823f 2024-11-29)" data-channel="nightly" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh_relay/index.html">iroh_<wbr>relay</a><span class="version">0.34.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module node_<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"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">iroh_relay</a></span><h1>Module <span>node_info</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/iroh_relay/node_info.rs.html#1-792">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.NodeId.html" title="type iroh_base::key::NodeId"><code>NodeId</code></a>.</p>
<p>Dialing by <a href="../../iroh_base/key/type.NodeId.html" title="type iroh_base::key::NodeId"><code>NodeId</code></a> is supported by iroh nodes 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-node-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::node_info::IROH_TXT_NAME"><code>IROH_TXT_NAME</code></a>.</p>
</li>
<li>
<p><code>&lt;z32-node-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>NodeId</code>].</p>
<p><code>&lt;z32-node-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.NodeId.html" title="type iroh_base::key::NodeId"><code>NodeId</code></a>.</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::RelayUrl"><code>RelayUrl</code></a> of this node.</p>
<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 node.</p>
</li>
<li>
<p><code>addr=&lt;addr&gt; &lt;addr&gt;</code>: A space-separated list of sockets addresses for this iroh node.
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><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.MaxLengthExceededError.html" title="struct iroh_relay::node_info::MaxLengthExceededError">MaxLength<wbr>Exceeded<wbr>Error</a></div><div class="desc docblock-short">Error returned when an input value is too long for <a href="struct.UserData.html" title="struct iroh_relay::node_info::UserData"><code>UserData</code></a>.</div></li><li><div class="item-name"><a class="struct" href="struct.NodeData.html" title="struct iroh_relay::node_info::NodeData">Node<wbr>Data</a></div><div class="desc docblock-short">Data about a node that may be published to and resolved from discovery services.</div></li><li><div class="item-name"><a class="struct" href="struct.NodeInfo.html" title="struct iroh_relay::node_info::NodeInfo">Node<wbr>Info</a></div><div class="desc docblock-short">Information about a node that may be published to and resolved from discovery services.</div></li><li><div class="item-name"><a class="struct" href="struct.UserData.html" title="struct iroh_relay::node_info::UserData">User<wbr>Data</a></div><div class="desc docblock-short">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::node_info::UserData::MAX_LENGTH"><code>UserData::MAX_LENGTH</code></a> bytes.</div></li></ul><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="enum" href="enum.Error.html" title="enum iroh_relay::node_info::Error">Error</a></div></li></ul><h2 id="constants" class="section-header">Constants<a href="#constants" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="constant" href="constant.IROH_TXT_NAME.html" title="constant iroh_relay::node_info::IROH_TXT_NAME">IROH_<wbr>TXT_<wbr>NAME</a></div><div class="desc docblock-short">The DNS name for the iroh TXT record.</div></li></ul><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="trait" href="trait.NodeIdExt.html" title="trait iroh_relay::node_info::NodeIdExt">Node<wbr>IdExt</a></div><div class="desc docblock-short">Extension methods for [<code>NodeId</code>] 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><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.MaxLengthExceededError.html" title="struct iroh_relay::node_info::MaxLengthExceededError">MaxLength<wbr>Exceeded<wbr>Error</a></div><div class="desc docblock-short">Error returned when an input value is too long for <a href="struct.UserData.html" title="struct iroh_relay::node_info::UserData"><code>UserData</code></a>.</div></li><li><div class="item-name"><a class="struct" href="struct.NodeData.html" title="struct iroh_relay::node_info::NodeData">Node<wbr>Data</a></div><div class="desc docblock-short">Data about a node that may be published to and resolved from discovery services.</div></li><li><div class="item-name"><a class="struct" href="struct.NodeInfo.html" title="struct iroh_relay::node_info::NodeInfo">Node<wbr>Info</a></div><div class="desc docblock-short">Information about a node that may be published to and resolved from discovery services.</div></li><li><div class="item-name"><a class="struct" href="struct.UserData.html" title="struct iroh_relay::node_info::UserData">User<wbr>Data</a></div><div class="desc docblock-short">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::node_info::UserData::MAX_LENGTH"><code>UserData::MAX_LENGTH</code></a> bytes.</div></li></ul><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="enum" href="enum.Error.html" title="enum iroh_relay::node_info::Error">Error</a></div></li></ul><h2 id="constants" class="section-header">Constants<a href="#constants" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="constant" href="constant.IROH_TXT_NAME.html" title="constant iroh_relay::node_info::IROH_TXT_NAME">IROH_<wbr>TXT_<wbr>NAME</a></div><div class="desc docblock-short">The DNS name for the iroh TXT record.</div></li></ul><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="trait" href="trait.NodeIdExt.html" title="trait iroh_relay::node_info::NodeIdExt">Node<wbr>IdExt</a></div><div class="desc docblock-short">Extension methods for <a href="../../iroh_base/key/type.NodeId.html" title="type iroh_base::key::NodeId"><code>NodeId</code></a> to encode to and decode from [<code>z32</code>],
which is the encoding used in [<code>pkarr</code>] domain names.</div></li></ul></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 `NodeId` to encode to and decode from `z32`, which is the encoding used in `pkarr` domain names."><title>NodeIdExt in iroh_relay::node_info - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-dbdb5eec.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh_relay" data-themes="" data-resource-suffix="" data-rustdoc-version="1.85.0-nightly (d10a6823f 2024-11-29)" data-channel="nightly" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh_relay/index.html">iroh_<wbr>relay</a><span class="version">0.34.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Node<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-NodeIdExt-for-PublicKey" title="NodeId">NodeId</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>node_<wbr>info</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">iroh_relay</a>::<wbr><a href="index.html">node_info</a></span><h1>Trait <span class="trait">NodeIdExt</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/iroh_relay/node_info.rs.html#82-92">Source</a> </span></div><pre class="rust item-decl"><code>pub trait NodeIdExt {
// 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;NodeId, <a class="enum" href="enum.Error.html" title="enum iroh_relay::node_info::Error">Error</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>NodeId</code>] 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;<a class="type" href="../../iroh_base/key/type.NodeId.html" title="type iroh_base::key::NodeId">NodeId</a>, <a class="enum" href="enum.Error.html" title="enum iroh_relay::node_info::Error">Error</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.NodeId.html" title="type iroh_base::key::NodeId"><code>NodeId</code></a> 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/node_info.rs.html#86">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>NodeId</code>] in [<code>z-base-32</code>] 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/node_info.rs.html#91">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;NodeId, <a class="enum" href="enum.Error.html" title="enum iroh_relay::node_info::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Parses a [<code>NodeId</code>] from [<code>z-base-32</code>] 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#object-safety">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-NodeIdExt-for-PublicKey" class="impl"><a class="src rightside" href="../../src/iroh_relay/node_info.rs.html#94-105">Source</a><a href="#impl-NodeIdExt-for-PublicKey" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.NodeIdExt.html" title="trait iroh_relay::node_info::NodeIdExt">NodeIdExt</a> for NodeId</h3></section></summary><div class="impl-items"><section id="method.to_z32" class="method trait-impl"><a class="src rightside" href="../../src/iroh_relay/node_info.rs.html#95-97">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/node_info.rs.html#99-104">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;NodeId, <a class="enum" href="enum.Error.html" title="enum iroh_relay::node_info::Error">Error</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/node_info/trait.NodeIdExt.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/node_info.rs.html#86">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.NodeId.html" title="type iroh_base::key::NodeId"><code>NodeId</code></a> in [<code>z-base-32</code>] 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/node_info.rs.html#91">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.NodeId.html" title="type iroh_base::key::NodeId">NodeId</a>, <a class="enum" href="enum.Error.html" title="enum iroh_relay::node_info::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Parses a <a href="../../iroh_base/key/type.NodeId.html" title="type iroh_base::key::NodeId"><code>NodeId</code></a> from [<code>z-base-32</code>] 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#object-safety">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-NodeIdExt-for-PublicKey" class="impl"><a class="src rightside" href="../../src/iroh_relay/node_info.rs.html#94-105">Source</a><a href="#impl-NodeIdExt-for-PublicKey" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.NodeIdExt.html" title="trait iroh_relay::node_info::NodeIdExt">NodeIdExt</a> for <a class="type" href="../../iroh_base/key/type.NodeId.html" title="type iroh_base::key::NodeId">NodeId</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/node_info.rs.html#95-97">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/node_info.rs.html#99-104">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.NodeId.html" title="type iroh_base::key::NodeId">NodeId</a>, <a class="enum" href="enum.Error.html" title="enum iroh_relay::node_info::Error">Error</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/node_info/trait.NodeIdExt.js" data-ignore-extern-crates="iroh_base" async></script></section></div></main></body></html>
File diff suppressed because one or more lines are too long
@@ -14,9 +14,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.quic_addr" class="method"><a class="src rightside" href="../../src/iroh_relay/server.rs.html#482-484">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.stun_addr" class="method"><a class="src rightside" href="../../src/iroh_relay/server.rs.html#487-489">Source</a><h4 class="code-header">pub fn <a href="#method.stun_addr" class="fn">stun_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 STUN 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#492-494">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#500-506">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>
</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#500-506">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>
<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#512-518">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>
</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#512-518">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>
<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></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#248">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#248">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
T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#139">Source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-AsTaggedExplicit%3C'a,+E%3E-for-T" class="impl"><a href="#impl-AsTaggedExplicit%3C'a,+E%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;'a, T, E&gt; AsTaggedExplicit&lt;'a, E&gt; 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
+56 -26
View File
@@ -2780,7 +2780,22 @@
<a href="#2779" id="2779">2779</a>
<a href="#2780" id="2780">2780</a>
<a href="#2781" id="2781">2781</a>
<a href="#2782" id="2782">2782</a></pre></div><pre class="rust"><code><span class="doccomment">//! The [`Endpoint`] allows establishing connections to other iroh nodes.
<a href="#2782" id="2782">2782</a>
<a href="#2783" id="2783">2783</a>
<a href="#2784" id="2784">2784</a>
<a href="#2785" id="2785">2785</a>
<a href="#2786" id="2786">2786</a>
<a href="#2787" id="2787">2787</a>
<a href="#2788" id="2788">2788</a>
<a href="#2789" id="2789">2789</a>
<a href="#2790" id="2790">2790</a>
<a href="#2791" id="2791">2791</a>
<a href="#2792" id="2792">2792</a>
<a href="#2793" id="2793">2793</a>
<a href="#2794" id="2794">2794</a>
<a href="#2795" id="2795">2795</a>
<a href="#2796" id="2796">2796</a>
<a href="#2797" id="2797">2797</a></pre></div><pre class="rust"><code><span class="doccomment">//! The [`Endpoint`] allows establishing connections to other iroh nodes.
//!
//! The [`Endpoint`] is the main API interface to manage a local iroh node. It allows
//! connecting to and accepting connections from other nodes. See the [module docs] for
@@ -2803,7 +2818,7 @@
task::Poll,
};
<span class="kw">use </span>anyhow::{bail, Context, <span class="prelude-ty">Result</span>};
<span class="kw">use </span>anyhow::{bail, Context};
<span class="kw">use </span>data_encoding::BASE32_DNSSEC;
<span class="kw">use </span>ed25519_dalek::{pkcs8::DecodePublicKey, VerifyingKey};
<span class="kw">use </span>iroh_base::{NodeAddr, NodeId, RelayUrl, SecretKey};
@@ -2824,7 +2839,7 @@
},
magicsock::{<span class="self">self</span>, Handle, NodeIdMappedAddr},
tls,
watchable::Watcher,
watchable::{Disconnected, Watcher},
RelayProtocol,
};
@@ -2949,7 +2964,7 @@
// # The final constructor that everyone needs.
</span><span class="doccomment">/// Binds the magic endpoint.
</span><span class="kw">pub async fn </span>bind(<span class="self">self</span>) -&gt; <span class="prelude-ty">Result</span>&lt;Endpoint&gt; {
</span><span class="kw">pub async fn </span>bind(<span class="self">self</span>) -&gt; anyhow::Result&lt;Endpoint&gt; {
<span class="kw">let </span>relay_map = <span class="self">self</span>.relay_mode.relay_map();
<span class="kw">let </span>secret_key = <span class="self">self
</span>.secret_key
@@ -3330,7 +3345,10 @@
<span class="kw">impl </span>StaticConfig {
<span class="doccomment">/// Create a [`quinn::ServerConfig`] with the specified ALPN protocols.
</span><span class="kw">fn </span>create_server_config(<span class="kw-2">&amp;</span><span class="self">self</span>, alpn_protocols: Vec&lt;Vec&lt;u8&gt;&gt;) -&gt; <span class="prelude-ty">Result</span>&lt;ServerConfig&gt; {
</span><span class="kw">fn </span>create_server_config(
<span class="kw-2">&amp;</span><span class="self">self</span>,
alpn_protocols: Vec&lt;Vec&lt;u8&gt;&gt;,
) -&gt; <span class="prelude-ty">Result</span>&lt;ServerConfig, tls::CreateConfigError&gt; {
<span class="kw">let </span>quic_server_config =
<span class="self">self</span>.tls_auth
.make_server_config(<span class="kw-2">&amp;</span><span class="self">self</span>.secret_key, alpn_protocols, <span class="self">self</span>.keylog)<span class="question-mark">?</span>;
@@ -3395,7 +3413,10 @@
/// This is for internal use, the public interface is the [`Builder`] obtained from
/// [Self::builder]. See the methods on the builder for documentation of the parameters.
</span><span class="attr">#[instrument(<span class="string">"ep"</span>, skip_all, fields(me = %static_config.secret_key.public().fmt_short()))]
</span><span class="kw">async fn </span>bind(static_config: StaticConfig, msock_opts: magicsock::Options) -&gt; <span class="prelude-ty">Result</span>&lt;<span class="self">Self</span>&gt; {
</span><span class="kw">async fn </span>bind(
static_config: StaticConfig,
msock_opts: magicsock::Options,
) -&gt; anyhow::Result&lt;<span class="self">Self</span>&gt; {
<span class="kw">let </span>msock = magicsock::MagicSock::spawn(msock_opts).<span class="kw">await</span><span class="question-mark">?</span>;
<span class="macro">trace!</span>(<span class="string">"created magicsock"</span>);
<span class="macro">debug!</span>(version = <span class="macro">env!</span>(<span class="string">"CARGO_PKG_VERSION"</span>), <span class="string">"iroh Endpoint created"</span>);
@@ -3415,7 +3436,7 @@
///
/// This will only affect new incoming connections.
/// Note that this *overrides* the current list of ALPNs.
</span><span class="kw">pub fn </span>set_alpns(<span class="kw-2">&amp;</span><span class="self">self</span>, alpns: Vec&lt;Vec&lt;u8&gt;&gt;) -&gt; <span class="prelude-ty">Result</span>&lt;()&gt; {
</span><span class="kw">pub fn </span>set_alpns(<span class="kw-2">&amp;</span><span class="self">self</span>, alpns: Vec&lt;Vec&lt;u8&gt;&gt;) -&gt; anyhow::Result&lt;()&gt; {
<span class="kw">let </span>server_config = <span class="self">self</span>.static_config.create_server_config(alpns)<span class="question-mark">?</span>;
<span class="self">self</span>.msock.endpoint().set_server_config(<span class="prelude-val">Some</span>(server_config));
<span class="prelude-val">Ok</span>(())
@@ -3445,7 +3466,11 @@
/// The `alpn`, or application-level protocol identifier, is also required. The remote
/// endpoint must support this `alpn`, otherwise the connection attempt will fail with
/// an error.
</span><span class="kw">pub async fn </span>connect(<span class="kw-2">&amp;</span><span class="self">self</span>, node_addr: <span class="kw">impl </span>Into&lt;NodeAddr&gt;, alpn: <span class="kw-2">&amp;</span>[u8]) -&gt; <span class="prelude-ty">Result</span>&lt;Connection&gt; {
</span><span class="kw">pub async fn </span>connect(
<span class="kw-2">&amp;</span><span class="self">self</span>,
node_addr: <span class="kw">impl </span>Into&lt;NodeAddr&gt;,
alpn: <span class="kw-2">&amp;</span>[u8],
) -&gt; anyhow::Result&lt;Connection&gt; {
<span class="kw">let </span>node_addr = node_addr.into();
<span class="kw">let </span>remote = node_addr.node_id;
<span class="kw">let </span>connecting = <span class="self">self
@@ -3487,7 +3512,7 @@
node_addr: <span class="kw">impl </span>Into&lt;NodeAddr&gt;,
alpn: <span class="kw-2">&amp;</span>[u8],
options: ConnectOptions,
) -&gt; <span class="prelude-ty">Result</span>&lt;Connecting&gt; {
) -&gt; anyhow::Result&lt;Connecting&gt; {
<span class="kw">let </span>node_addr: NodeAddr = node_addr.into();
tracing::Span::current().record(<span class="string">"remote"</span>, node_addr.node_id.fmt_short());
@@ -3609,7 +3634,7 @@
/// if the direct addresses are a subset of ours.
///
/// [`StaticProvider`]: crate::discovery::static_provider::StaticProvider
</span><span class="kw">pub fn </span>add_node_addr(<span class="kw-2">&amp;</span><span class="self">self</span>, node_addr: NodeAddr) -&gt; <span class="prelude-ty">Result</span>&lt;()&gt; {
</span><span class="kw">pub fn </span>add_node_addr(<span class="kw-2">&amp;</span><span class="self">self</span>, node_addr: NodeAddr) -&gt; anyhow::Result&lt;()&gt; {
<span class="self">self</span>.add_node_addr_inner(node_addr, magicsock::Source::App)
}
@@ -3636,7 +3661,7 @@
<span class="kw-2">&amp;</span><span class="self">self</span>,
node_addr: NodeAddr,
source: <span class="kw-2">&amp;</span><span class="lifetime">'static </span>str,
) -&gt; <span class="prelude-ty">Result</span>&lt;()&gt; {
) -&gt; anyhow::Result&lt;()&gt; {
<span class="self">self</span>.add_node_addr_inner(
node_addr,
magicsock::Source::NamedApp {
@@ -3645,7 +3670,11 @@
)
}
<span class="kw">fn </span>add_node_addr_inner(<span class="kw-2">&amp;</span><span class="self">self</span>, node_addr: NodeAddr, source: magicsock::Source) -&gt; <span class="prelude-ty">Result</span>&lt;()&gt; {
<span class="kw">fn </span>add_node_addr_inner(
<span class="kw-2">&amp;</span><span class="self">self</span>,
node_addr: NodeAddr,
source: magicsock::Source,
) -&gt; anyhow::Result&lt;()&gt; {
<span class="comment">// Connecting to ourselves is not supported.
</span><span class="kw">if </span>node_addr.node_id == <span class="self">self</span>.node_id() {
<span class="macro">bail!</span>(
@@ -3679,7 +3708,7 @@
///
/// In browsers, because direct addresses are unavailable, this will only wait for
/// the home relay to be available before returning.
</span><span class="kw">pub async fn </span>node_addr(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="prelude-ty">Result</span>&lt;NodeAddr&gt; {
</span><span class="kw">pub async fn </span>node_addr(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="prelude-ty">Result</span>&lt;NodeAddr, Disconnected&gt; {
<span class="attr">#[cfg(not(wasm_browser))]
</span>{
<span class="comment">// Outside browsers, we preserve the "old" behavior of waiting for direct
@@ -3865,8 +3894,8 @@
///
/// # Errors
///
/// Will error if we do not have any address information for the given `node_id`.
</span><span class="kw">pub fn </span>conn_type(<span class="kw-2">&amp;</span><span class="self">self</span>, node_id: NodeId) -&gt; <span class="prelude-ty">Result</span>&lt;Watcher&lt;ConnectionType&gt;&gt; {
/// Will return `None` if we do not have any address information for the given `node_id`.
</span><span class="kw">pub fn </span>conn_type(<span class="kw-2">&amp;</span><span class="self">self</span>, node_id: NodeId) -&gt; <span class="prelude-ty">Option</span>&lt;Watcher&lt;ConnectionType&gt;&gt; {
<span class="self">self</span>.msock.conn_type(node_id)
}
@@ -3980,7 +4009,7 @@
</span><span class="kw">async fn </span>get_mapping_addr_and_maybe_start_discovery(
<span class="kw-2">&amp;</span><span class="self">self</span>,
node_addr: NodeAddr,
) -&gt; <span class="prelude-ty">Result</span>&lt;(NodeIdMappedAddr, <span class="prelude-ty">Option</span>&lt;DiscoveryTask&gt;)&gt; {
) -&gt; anyhow::Result&lt;(NodeIdMappedAddr, <span class="prelude-ty">Option</span>&lt;DiscoveryTask&gt;)&gt; {
<span class="kw">let </span>node_id = node_addr.node_id;
<span class="comment">// Only return a mapped addr if we have some way of dialing this node, in other
@@ -4309,9 +4338,7 @@
</span>}
<span class="doccomment">/// Extracts the ALPN protocol from the peer's handshake data.
</span><span class="comment">// Note, we could totally provide this method to be on a Connection as well. But we'd
// need to wrap Connection too.
</span><span class="kw">pub async fn </span>alpn(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; <span class="prelude-ty">Result</span>&lt;Vec&lt;u8&gt;&gt; {
</span><span class="kw">pub async fn </span>alpn(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; anyhow::Result&lt;Vec&lt;u8&gt;&gt; {
<span class="kw">let </span>data = <span class="self">self</span>.handshake_data().<span class="kw">await</span><span class="question-mark">?</span>;
<span class="kw">match </span>data.downcast::&lt;quinn::crypto::rustls::HandshakeData&gt;() {
<span class="prelude-val">Ok</span>(data) =&gt; <span class="kw">match </span>data.protocol {
@@ -4602,7 +4629,7 @@
///
/// [`PublicKey`]: iroh_base::PublicKey
</span><span class="comment">// TODO: Would be nice if this could be infallible.
</span><span class="kw">pub fn </span>remote_node_id(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="prelude-ty">Result</span>&lt;NodeId&gt; {
</span><span class="kw">pub fn </span>remote_node_id(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; anyhow::Result&lt;NodeId&gt; {
<span class="kw">let </span>data = <span class="self">self</span>.peer_identity();
<span class="kw">match </span>data {
<span class="prelude-val">None </span>=&gt; <span class="macro">bail!</span>(<span class="string">"no peer certificate found"</span>),
@@ -4693,7 +4720,7 @@
<span class="macro">warn!</span>(<span class="question-mark">?</span>conn, <span class="string">"failed to get remote node id"</span>);
<span class="kw">return</span>;
};
<span class="kw">let </span><span class="prelude-val">Ok</span>(conn_type_changes) = magic_ep.conn_type(node_id) <span class="kw">else </span>{
<span class="kw">let </span><span class="prelude-val">Some</span>(conn_type_changes) = magic_ep.conn_type(node_id) <span class="kw">else </span>{
<span class="macro">warn!</span>(<span class="question-mark">?</span>conn, <span class="string">"failed to create conn_type stream"</span>);
<span class="kw">return</span>;
};
@@ -5273,8 +5300,8 @@
.<span class="kw">await
</span>.unwrap();
<span class="kw">async fn </span>handle_direct_conn(ep: <span class="kw-2">&amp;</span>Endpoint, node_id: NodeId) -&gt; <span class="prelude-ty">Result</span>&lt;()&gt; {
<span class="kw">let </span><span class="kw-2">mut </span>stream = ep.conn_type(node_id)<span class="question-mark">?</span>.stream();
<span class="kw">async fn </span>handle_direct_conn(ep: <span class="kw-2">&amp;</span>Endpoint, node_id: NodeId) -&gt; anyhow::Result&lt;()&gt; {
<span class="kw">let </span><span class="kw-2">mut </span>stream = ep.conn_type(node_id).expect(<span class="string">"missing conn type"</span>).stream();
<span class="kw">let </span>src = ep.node_id().fmt_short();
<span class="kw">let </span>dst = node_id.fmt_short();
<span class="kw">while let </span><span class="prelude-val">Some</span>(conn_type) = stream.next().<span class="kw">await </span>{
@@ -5341,7 +5368,10 @@
.unwrap();
}
<span class="kw">async fn </span>spawn_0rtt_server(secret_key: SecretKey, log_span: tracing::Span) -&gt; <span class="prelude-ty">Result</span>&lt;Endpoint&gt; {
<span class="kw">async fn </span>spawn_0rtt_server(
secret_key: SecretKey,
log_span: tracing::Span,
) -&gt; anyhow::Result&lt;Endpoint&gt; {
<span class="kw">let </span>server = Endpoint::builder()
.secret_key(secret_key)
.alpns(<span class="macro">vec!</span>[TEST_ALPN.to_vec()])
@@ -5385,7 +5415,7 @@
<span class="kw">async fn </span>connect_client_0rtt_expect_err(
client: <span class="kw-2">&amp;</span>Endpoint,
server_addr: NodeAddr,
) -&gt; <span class="prelude-ty">Result</span>&lt;()&gt; {
) -&gt; anyhow::Result&lt;()&gt; {
<span class="kw">let </span>conn = client
.connect_with_opts(server_addr, TEST_ALPN, ConnectOptions::new())
.<span class="kw">await</span><span class="question-mark">?
@@ -5406,7 +5436,7 @@
client: <span class="kw-2">&amp;</span>Endpoint,
server_addr: NodeAddr,
expect_server_accepts: bool,
) -&gt; <span class="prelude-ty">Result</span>&lt;()&gt; {
) -&gt; anyhow::Result&lt;()&gt; {
<span class="kw">let </span>(conn, accepted_0rtt) = client
.connect_with_opts(server_addr, TEST_ALPN, ConnectOptions::new())
.<span class="kw">await</span><span class="question-mark">?
+41 -27
View File
@@ -4431,7 +4431,14 @@
<a href="#4430" id="4430">4430</a>
<a href="#4431" id="4431">4431</a>
<a href="#4432" id="4432">4432</a>
<a href="#4433" id="4433">4433</a></pre></div><pre class="rust"><code><span class="doccomment">//! Implements a socket that can change its communication path while in use, actively searching for the best way to communicate.
<a href="#4433" id="4433">4433</a>
<a href="#4434" id="4434">4434</a>
<a href="#4435" id="4435">4435</a>
<a href="#4436" id="4436">4436</a>
<a href="#4437" id="4437">4437</a>
<a href="#4438" id="4438">4438</a>
<a href="#4439" id="4439">4439</a>
<a href="#4440" id="4440">4440</a></pre></div><pre class="rust"><code><span class="doccomment">//! Implements a socket that can change its communication path while in use, actively searching for the best way to communicate.
//!
//! Based on tailscale/wgengine/magicsock
//!
@@ -4461,7 +4468,7 @@
task::{Context, Poll, Waker},
};
<span class="kw">use </span>anyhow::{anyhow, Context <span class="kw">as _</span>, <span class="prelude-ty">Result</span>};
<span class="kw">use </span>anyhow::{anyhow, Context <span class="kw">as _</span>};
<span class="kw">use </span>atomic_waker::AtomicWaker;
<span class="kw">use </span>bytes::Bytes;
<span class="kw">use </span>concurrent_queue::ConcurrentQueue;
@@ -4710,7 +4717,7 @@
<span class="kw">impl </span>MagicSock {
<span class="doccomment">/// Creates a magic [`MagicSock`] listening on [`Options::addr_v4`] and [`Options::addr_v6`].
</span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">async fn </span>spawn(opts: Options) -&gt; <span class="prelude-ty">Result</span>&lt;Handle&gt; {
</span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">async fn </span>spawn(opts: Options) -&gt; anyhow::Result&lt;Handle&gt; {
Handle::new(opts).<span class="kw">await
</span>}
@@ -4800,9 +4807,9 @@
///
/// # Errors
///
/// Will return an error if there is no address information known about the
/// Will return `None` if there is no address information known about the
/// given `node_id`.
</span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>conn_type(<span class="kw-2">&amp;</span><span class="self">self</span>, node_id: NodeId) -&gt; <span class="prelude-ty">Result</span>&lt;Watcher&lt;ConnectionType&gt;&gt; {
</span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>conn_type(<span class="kw-2">&amp;</span><span class="self">self</span>, node_id: NodeId) -&gt; <span class="prelude-ty">Option</span>&lt;Watcher&lt;ConnectionType&gt;&gt; {
<span class="self">self</span>.node_map.conn_type(node_id)
}
@@ -4813,7 +4820,11 @@
<span class="doccomment">/// Add addresses for a node to the magic socket's addresbook.
</span><span class="attr">#[instrument(skip_all, fields(me = %<span class="self">self</span>.me))]
</span><span class="kw">pub fn </span>add_node_addr(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="kw-2">mut </span>addr: NodeAddr, source: node_map::Source) -&gt; <span class="prelude-ty">Result</span>&lt;()&gt; {
</span><span class="kw">pub fn </span>add_node_addr(
<span class="kw-2">&amp;</span><span class="self">self</span>,
<span class="kw-2">mut </span>addr: NodeAddr,
source: node_map::Source,
) -&gt; anyhow::Result&lt;()&gt; {
<span class="kw">let </span><span class="kw-2">mut </span>pruned = <span class="number">0</span>;
<span class="kw">for </span>my_addr <span class="kw">in </span><span class="self">self</span>.direct_addrs.sockaddrs() {
<span class="kw">if </span>addr.direct_addresses.remove(<span class="kw-2">&amp;</span>my_addr) {
@@ -6094,7 +6105,7 @@
<span class="kw">impl </span>Handle {
<span class="doccomment">/// Creates a magic [`MagicSock`] listening on [`Options::addr_v4`] and [`Options::addr_v6`].
</span><span class="kw">async fn </span>new(opts: Options) -&gt; <span class="prelude-ty">Result</span>&lt;<span class="self">Self</span>&gt; {
</span><span class="kw">async fn </span>new(opts: Options) -&gt; anyhow::Result&lt;<span class="self">Self</span>&gt; {
<span class="kw">let </span>me = opts.secret_key.public().fmt_short();
<span class="self">Self</span>::with_name(me, opts)
@@ -6102,7 +6113,7 @@
.<span class="kw">await
</span>}
<span class="kw">async fn </span>with_name(me: String, opts: Options) -&gt; <span class="prelude-ty">Result</span>&lt;<span class="self">Self</span>&gt; {
<span class="kw">async fn </span>with_name(me: String, opts: Options) -&gt; anyhow::Result&lt;<span class="self">Self</span>&gt; {
<span class="kw">let </span>Options {
addr_v4,
addr_v6,
@@ -6547,7 +6558,7 @@
/// The reason this method is made available as `&amp;self` is because
/// the interface for quinn's [`AsyncUdpSocket::poll_recv`] requires us
/// to be able to poll from `&amp;self`.
</span><span class="kw">fn </span>poll_recv(<span class="kw-2">&amp;</span><span class="self">self</span>, cx: <span class="kw-2">&amp;mut </span>Context) -&gt; Poll&lt;<span class="prelude-ty">Result</span>&lt;RelayRecvDatagram&gt;&gt; {
</span><span class="kw">fn </span>poll_recv(<span class="kw-2">&amp;</span><span class="self">self</span>, cx: <span class="kw-2">&amp;mut </span>Context) -&gt; Poll&lt;anyhow::Result&lt;RelayRecvDatagram&gt;&gt; {
<span class="kw">match </span><span class="self">self</span>.queue.pop() {
<span class="prelude-val">Ok</span>(value) =&gt; Poll::Ready(<span class="prelude-val">Ok</span>(value)),
<span class="prelude-val">Err</span>(concurrent_queue::PopError::Empty) =&gt; {
@@ -6721,7 +6732,10 @@
</span><span class="kw">enum </span>ActorMessage {
Shutdown,
EndpointPingExpired(usize, stun_rs::TransactionId),
NetReport(<span class="prelude-ty">Result</span>&lt;<span class="prelude-ty">Option</span>&lt;Arc&lt;net_report::Report&gt;&gt;&gt;, <span class="kw-2">&amp;</span><span class="lifetime">'static </span>str),
NetReport(
anyhow::Result&lt;<span class="prelude-ty">Option</span>&lt;Arc&lt;net_report::Report&gt;&gt;&gt;,
<span class="kw-2">&amp;</span><span class="lifetime">'static </span>str,
),
NetworkChange,
<span class="attr">#[cfg(test)]
</span>ForceNetworkChange(bool),
@@ -6771,7 +6785,7 @@
<span class="attr">#[cfg(not(wasm_browser))]
</span><span class="kw">impl </span>ActorSocketState {
<span class="kw">fn </span>bind(addr_v4: <span class="prelude-ty">Option</span>&lt;SocketAddrV4&gt;, addr_v6: <span class="prelude-ty">Option</span>&lt;SocketAddrV6&gt;) -&gt; <span class="prelude-ty">Result</span>&lt;<span class="self">Self</span>&gt; {
<span class="kw">fn </span>bind(addr_v4: <span class="prelude-ty">Option</span>&lt;SocketAddrV4&gt;, addr_v6: <span class="prelude-ty">Option</span>&lt;SocketAddrV6&gt;) -&gt; anyhow::Result&lt;<span class="self">Self</span>&gt; {
<span class="kw">let </span>port_mapper = portmapper::Client::default();
<span class="kw">let </span>(v4, v6) = <span class="self">Self</span>::bind_sockets(addr_v4, addr_v6)<span class="question-mark">?</span>;
@@ -6802,7 +6816,7 @@
<span class="kw">fn </span>bind_sockets(
addr_v4: <span class="prelude-ty">Option</span>&lt;SocketAddrV4&gt;,
addr_v6: <span class="prelude-ty">Option</span>&lt;SocketAddrV6&gt;,
) -&gt; <span class="prelude-ty">Result</span>&lt;(Arc&lt;UdpSocket&gt;, <span class="prelude-ty">Option</span>&lt;Arc&lt;UdpSocket&gt;&gt;)&gt; {
) -&gt; anyhow::Result&lt;(Arc&lt;UdpSocket&gt;, <span class="prelude-ty">Option</span>&lt;Arc&lt;UdpSocket&gt;&gt;)&gt; {
<span class="kw">let </span>addr_v4 = addr_v4.unwrap_or_else(|| SocketAddrV4::new(Ipv4Addr::UNSPECIFIED, <span class="number">0</span>));
<span class="kw">let </span>v4 = Arc::new(bind_with_fallback(SocketAddr::V4(addr_v4)).context(<span class="string">"bind IPv4 failed"</span>)<span class="question-mark">?</span>);
@@ -6821,7 +6835,7 @@
<span class="prelude-val">Ok</span>((v4, v6))
}
<span class="kw">fn </span>msock_socket_state(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="prelude-ty">Result</span>&lt;SocketState&gt; {
<span class="kw">fn </span>msock_socket_state(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; anyhow::Result&lt;SocketState&gt; {
<span class="kw">let </span>ipv4_addr = <span class="self">self</span>.v4.local_addr()<span class="question-mark">?</span>;
<span class="kw">let </span>ipv6_addr = <span class="self">self</span>.v6.as_ref().and_then(|c| c.local_addr().ok());
@@ -6837,7 +6851,7 @@
}
<span class="kw">impl </span>Actor {
<span class="kw">async fn </span>run(<span class="kw-2">mut </span><span class="self">self</span>) -&gt; <span class="prelude-ty">Result</span>&lt;()&gt; {
<span class="kw">async fn </span>run(<span class="kw-2">mut </span><span class="self">self</span>) -&gt; anyhow::Result&lt;()&gt; {
<span class="comment">// Setup network monitoring
</span><span class="kw">let </span>(link_change_s, <span class="kw-2">mut </span>link_change_r) = mpsc::channel(<span class="number">8</span>);
<span class="kw">let </span>_token = <span class="self">self
@@ -7901,7 +7915,7 @@
}
<span class="kw">impl </span>MagicStack {
<span class="kw">async fn </span>new(relay_mode: RelayMode) -&gt; <span class="prelude-ty">Result</span>&lt;<span class="self">Self</span>&gt; {
<span class="kw">async fn </span>new(relay_mode: RelayMode) -&gt; anyhow::Result&lt;<span class="self">Self</span>&gt; {
<span class="kw">let </span>secret_key = SecretKey::generate(rand::thread_rng());
<span class="kw">let </span><span class="kw-2">mut </span>transport_config = quinn::TransportConfig::default();
@@ -7944,7 +7958,7 @@
///
/// When the returned drop guard is dropped, the tasks doing this updating are stopped.
</span><span class="attr">#[instrument(skip_all)]
</span><span class="kw">async fn </span>mesh_stacks(stacks: Vec&lt;MagicStack&gt;) -&gt; <span class="prelude-ty">Result</span>&lt;JoinSet&lt;()&gt;&gt; {
</span><span class="kw">async fn </span>mesh_stacks(stacks: Vec&lt;MagicStack&gt;) -&gt; anyhow::Result&lt;JoinSet&lt;()&gt;&gt; {
<span class="doccomment">/// Registers endpoint addresses of a node to all other nodes.
</span><span class="kw">fn </span>update_direct_addrs(
stacks: <span class="kw-2">&amp;</span>[MagicStack],
@@ -8009,7 +8023,7 @@
}
<span class="attr">#[instrument(skip_all, fields(me = %ep.endpoint.node_id().fmt_short()))]
</span><span class="kw">async fn </span>echo_receiver(ep: MagicStack, loss: ExpectedLoss) -&gt; <span class="prelude-ty">Result</span>&lt;()&gt; {
</span><span class="kw">async fn </span>echo_receiver(ep: MagicStack, loss: ExpectedLoss) -&gt; anyhow::Result&lt;()&gt; {
<span class="macro">info!</span>(<span class="string">"accepting conn"</span>);
<span class="kw">let </span>conn = ep.endpoint.accept().<span class="kw">await</span>.expect(<span class="string">"no conn"</span>);
@@ -8061,7 +8075,7 @@
dest_id: PublicKey,
msg: <span class="kw-2">&amp;</span>[u8],
loss: ExpectedLoss,
) -&gt; <span class="prelude-ty">Result</span>&lt;()&gt; {
) -&gt; anyhow::Result&lt;()&gt; {
<span class="macro">info!</span>(<span class="string">"connecting to {}"</span>, dest_id.fmt_short());
<span class="kw">let </span>dest = NodeAddr::new(dest_id);
<span class="kw">let </span>conn = ep
@@ -8154,7 +8168,7 @@
<span class="attr">#[tokio::test(flavor = <span class="string">"multi_thread"</span>)]
#[traced_test]
</span><span class="kw">async fn </span>test_two_devices_roundtrip_quinn_magic() -&gt; <span class="prelude-ty">Result</span>&lt;()&gt; {
</span><span class="kw">async fn </span>test_two_devices_roundtrip_quinn_magic() -&gt; anyhow::Result&lt;()&gt; {
<span class="kw">let </span>m1 = MagicStack::new(RelayMode::Disabled).<span class="kw">await</span><span class="question-mark">?</span>;
<span class="kw">let </span>m2 = MagicStack::new(RelayMode::Disabled).<span class="kw">await</span><span class="question-mark">?</span>;
@@ -8228,7 +8242,7 @@
<span class="attr">#[tokio::test(flavor = <span class="string">"multi_thread"</span>)]
#[traced_test]
</span><span class="kw">async fn </span>test_two_devices_roundtrip_network_change() -&gt; <span class="prelude-ty">Result</span>&lt;()&gt; {
</span><span class="kw">async fn </span>test_two_devices_roundtrip_network_change() -&gt; anyhow::Result&lt;()&gt; {
time::timeout(
Duration::from_secs(<span class="number">90</span>),
test_two_devices_roundtrip_network_change_impl(),
@@ -8238,7 +8252,7 @@
<span class="doccomment">/// Same structure as `test_two_devices_roundtrip_quinn_magic`, but interrupts regularly
/// with (simulated) network changes.
</span><span class="kw">async fn </span>test_two_devices_roundtrip_network_change_impl() -&gt; <span class="prelude-ty">Result</span>&lt;()&gt; {
</span><span class="kw">async fn </span>test_two_devices_roundtrip_network_change_impl() -&gt; anyhow::Result&lt;()&gt; {
<span class="kw">let </span>m1 = MagicStack::new(RelayMode::Disabled).<span class="kw">await</span><span class="question-mark">?</span>;
<span class="kw">let </span>m2 = MagicStack::new(RelayMode::Disabled).<span class="kw">await</span><span class="question-mark">?</span>;
@@ -8336,7 +8350,7 @@
<span class="attr">#[tokio::test(flavor = <span class="string">"multi_thread"</span>)]
#[traced_test]
</span><span class="kw">async fn </span>test_two_devices_setup_teardown() -&gt; <span class="prelude-ty">Result</span>&lt;()&gt; {
</span><span class="kw">async fn </span>test_two_devices_setup_teardown() -&gt; anyhow::Result&lt;()&gt; {
<span class="kw">for </span>i <span class="kw">in </span><span class="number">0</span>..<span class="number">10 </span>{
<span class="macro">println!</span>(<span class="string">"-- round {i}"</span>);
<span class="macro">println!</span>(<span class="string">"setting up magic stack"</span>);
@@ -8489,7 +8503,7 @@
addr: NodeIdMappedAddr,
node_id: NodeId,
tls_auth: tls::Authentication,
) -&gt; <span class="prelude-ty">Result</span>&lt;quinn::Connection&gt; {
) -&gt; anyhow::Result&lt;quinn::Connection&gt; {
<span class="comment">// Endpoint::connect sets this, do the same to have similar behaviour.
</span><span class="kw">let </span><span class="kw-2">mut </span>transport_config = quinn::TransportConfig::default();
transport_config.keep_alive_interval(<span class="prelude-val">Some</span>(Duration::from_secs(<span class="number">1</span>)));
@@ -8518,7 +8532,7 @@
node_id: NodeId,
transport_config: Arc&lt;quinn::TransportConfig&gt;,
tls_auth: tls::Authentication,
) -&gt; <span class="prelude-ty">Result</span>&lt;quinn::Connection&gt; {
) -&gt; anyhow::Result&lt;quinn::Connection&gt; {
<span class="kw">let </span>alpns = <span class="macro">vec!</span>[ALPN.to_vec()];
<span class="kw">let </span>quic_client_config =
tls_auth.make_client_config(<span class="kw-2">&amp;</span>ep_secret_key, node_id, alpns, <span class="prelude-val">None</span>, <span class="bool-val">true</span>)<span class="question-mark">?</span>;
@@ -8574,7 +8588,7 @@
<span class="comment">// This needs an accept task
</span><span class="kw">let </span>accept_task = tokio::spawn({
<span class="kw">async fn </span>accept(ep: quinn::Endpoint) -&gt; <span class="prelude-ty">Result</span>&lt;()&gt; {
<span class="kw">async fn </span>accept(ep: quinn::Endpoint) -&gt; anyhow::Result&lt;()&gt; {
<span class="kw">let </span>incoming = ep.accept().<span class="kw">await</span>.ok_or(<span class="macro">anyhow!</span>(<span class="string">"no incoming"</span>))<span class="question-mark">?</span>;
<span class="kw">let </span>_conn = incoming.accept()<span class="question-mark">?</span>.<span class="kw">await</span><span class="question-mark">?</span>;
@@ -8652,7 +8666,7 @@
<span class="comment">// We need a task to accept the connection.
</span><span class="kw">let </span>accept_task = tokio::spawn({
<span class="kw">async fn </span>accept(ep: quinn::Endpoint) -&gt; <span class="prelude-ty">Result</span>&lt;()&gt; {
<span class="kw">async fn </span>accept(ep: quinn::Endpoint) -&gt; anyhow::Result&lt;()&gt; {
<span class="kw">let </span>incoming = ep.accept().<span class="kw">await</span>.ok_or(<span class="macro">anyhow!</span>(<span class="string">"no incoming"</span>))<span class="question-mark">?</span>;
<span class="kw">let </span>conn = incoming.accept()<span class="question-mark">?</span>.<span class="kw">await</span><span class="question-mark">?</span>;
<span class="kw">let </span><span class="kw-2">mut </span>stream = conn.accept_uni().<span class="kw">await</span><span class="question-mark">?</span>;
@@ -8806,7 +8820,7 @@
}
<span class="attr">#[tokio::test]
</span><span class="kw">async fn </span>test_add_node_addr() -&gt; <span class="prelude-ty">Result</span>&lt;()&gt; {
</span><span class="kw">async fn </span>test_add_node_addr() -&gt; anyhow::Result&lt;()&gt; {
<span class="kw">let </span>stack = MagicStack::new(RelayMode::Default).<span class="kw">await</span><span class="question-mark">?</span>;
<span class="kw">let </span><span class="kw-2">mut </span>rng = rand::thread_rng();
@@ -884,9 +884,7 @@
<a href="#883" id="883">883</a>
<a href="#884" id="884">884</a>
<a href="#885" id="885">885</a>
<a href="#886" id="886">886</a>
<a href="#887" id="887">887</a>
<a href="#888" id="888">888</a></pre></div><pre class="rust"><code><span class="kw">use </span>std::{
<a href="#886" id="886">886</a></pre></div><pre class="rust"><code><span class="kw">use </span>std::{
collections::{hash_map::Entry, BTreeSet, HashMap},
hash::Hash,
net::{IpAddr, SocketAddr},
@@ -1192,9 +1190,9 @@
///
/// # Errors
///
/// Will return an error if there is not an entry in the [`NodeMap`] for
/// Will return `None` if there is not an entry in the [`NodeMap`] for
/// the `node_id`
</span><span class="kw">pub</span>(<span class="kw">super</span>) <span class="kw">fn </span>conn_type(<span class="kw-2">&amp;</span><span class="self">self</span>, node_id: NodeId) -&gt; anyhow::Result&lt;Watcher&lt;ConnectionType&gt;&gt; {
</span><span class="kw">pub</span>(<span class="kw">super</span>) <span class="kw">fn </span>conn_type(<span class="kw-2">&amp;</span><span class="self">self</span>, node_id: NodeId) -&gt; <span class="prelude-ty">Option</span>&lt;Watcher&lt;ConnectionType&gt;&gt; {
<span class="self">self</span>.inner.lock().expect(<span class="string">"poisoned"</span>).conn_type(node_id)
}
@@ -1383,13 +1381,11 @@
///
/// # Errors
///
/// Will return an error if there is not an entry in the [`NodeMap`] for
/// Will return `None` if there is not an entry in the [`NodeMap`] for
/// the `public_key`
</span><span class="kw">fn </span>conn_type(<span class="kw-2">&amp;</span><span class="self">self</span>, node_id: NodeId) -&gt; anyhow::Result&lt;Watcher&lt;ConnectionType&gt;&gt; {
<span class="kw">match </span><span class="self">self</span>.get(NodeStateKey::NodeId(node_id)) {
<span class="prelude-val">Some</span>(ep) =&gt; <span class="prelude-val">Ok</span>(ep.conn_type()),
<span class="prelude-val">None </span>=&gt; <span class="macro">anyhow::bail!</span>(<span class="string">"No endpoint for {node_id:?} found"</span>),
}
</span><span class="kw">fn </span>conn_type(<span class="kw-2">&amp;</span><span class="self">self</span>, node_id: NodeId) -&gt; <span class="prelude-ty">Option</span>&lt;Watcher&lt;ConnectionType&gt;&gt; {
<span class="self">self</span>.get(NodeStateKey::NodeId(node_id))
.map(|ep| ep.conn_type())
}
<span class="kw">fn </span>handle_pong(<span class="kw-2">&amp;mut </span><span class="self">self</span>, sender: NodeId, src: <span class="kw-2">&amp;</span>DiscoMessageSource, pong: Pong) {
@@ -1668,7 +1668,7 @@
},
};
<span class="kw">use </span>anyhow::{anyhow, <span class="prelude-ty">Result</span>};
<span class="kw">use </span>anyhow::anyhow;
<span class="kw">use </span>backon::{Backoff, BackoffBuilder, ExponentialBuilder};
<span class="kw">use </span>bytes::{Bytes, BytesMut};
<span class="kw">use </span>iroh_base::{NodeId, PublicKey, RelayUrl, SecretKey};
@@ -1923,7 +1923,7 @@
<span class="doccomment">/// The main actor run loop.
///
/// Primarily switches between the dialing and connected states.
</span><span class="kw">async fn </span>run(<span class="kw-2">mut </span><span class="self">self</span>) -&gt; <span class="prelude-ty">Result</span>&lt;()&gt; {
</span><span class="kw">async fn </span>run(<span class="kw-2">mut </span><span class="self">self</span>) -&gt; anyhow::Result&lt;()&gt; {
<span class="kw">use </span>anyhow::Context;
<span class="macro">inc!</span>(MagicsockMetrics, num_relay_conns_added);
@@ -1999,7 +1999,7 @@
///
/// Returns `None` if the actor needs to shut down. Returns `Some(Ok(client))` when the
/// connection is established, and `Some(Err(err))` if dialing the relay failed.
</span><span class="kw">async fn </span>run_dialing(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; <span class="prelude-ty">Option</span>&lt;<span class="prelude-ty">Result</span>&lt;iroh_relay::client::Client&gt;&gt; {
</span><span class="kw">async fn </span>run_dialing(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; <span class="prelude-ty">Option</span>&lt;anyhow::Result&lt;iroh_relay::client::Client&gt;&gt; {
<span class="macro">debug!</span>(<span class="string">"Actor loop: connecting to relay."</span>);
<span class="comment">// We regularly flush the relay_datagrams_send queue so it is not full of stale
@@ -2086,7 +2086,7 @@
/// connections. It currently does not ever return `Err` as the retries continue
/// forever.
</span><span class="comment">// This is using `impl Future` to return a future without a reference to self.
</span><span class="kw">fn </span>dial_relay(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="kw">impl </span>Future&lt;Output = <span class="prelude-ty">Result</span>&lt;Client&gt;&gt; {
</span><span class="kw">fn </span>dial_relay(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="kw">impl </span>Future&lt;Output = anyhow::Result&lt;Client&gt;&gt; {
<span class="kw">let </span>client_builder = <span class="self">self</span>.relay_client_builder.clone();
<span class="kw">async move </span>{
<span class="kw">match </span>time::timeout(CONNECT_TIMEOUT, client_builder.connect()).<span class="kw">await </span>{
@@ -3048,7 +3048,7 @@
item: RelaySendItem,
tx: <span class="kw-2">&amp;</span>mpsc::Sender&lt;RelaySendItem&gt;,
rx: <span class="kw-2">&amp;</span>Arc&lt;RelayDatagramRecvQueue&gt;,
) -&gt; <span class="prelude-ty">Result</span>&lt;()&gt; {
) -&gt; anyhow::Result&lt;()&gt; {
<span class="macro">assert!</span>(item.datagrams.len() == <span class="number">1</span>);
tokio::time::timeout(Duration::from_secs(<span class="number">10</span>), <span class="kw">async move </span>{
<span class="kw">loop </span>{
File diff suppressed because one or more lines are too long