deploy: 0701b33073f0e0ff19eabf446a71a0a7c08705fa

This commit is contained in:
matheus23
2025-02-21 16:16:17 +00:00
parent 8ea500d395
commit 2377010a9e
70 changed files with 893 additions and 251 deletions
File diff suppressed because one or more lines are too long
+2 -2
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="Node address discovery."><title>iroh::discovery - 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.32.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module discovery</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#examples" title="Examples">Examples</a></li></ul><h3><a href="#modules">Module Items</a></h3><ul class="block"><li><a href="#modules" title="Modules">Modules</a></li><li><a href="#structs" title="Structs">Structs</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</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>discovery</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/discovery.rs.html#1-1065">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Node address discovery.</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="Node address discovery."><title>iroh::discovery - 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.32.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module discovery</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#examples" title="Examples">Examples</a></li></ul><h3><a href="#modules">Module Items</a></h3><ul class="block"><li><a href="#modules" title="Modules">Modules</a></li><li><a href="#structs" title="Structs">Structs</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</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>discovery</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/discovery.rs.html#1-1069">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Node address discovery.</p>
<p>To connect to an iroh node a <a href="../struct.NodeAddr.html" title="struct iroh::NodeAddr"><code>NodeAddr</code></a> is needed, which may contain a
<a href="../struct.RelayUrl.html" title="struct iroh::RelayUrl"><code>RelayUrl</code></a> or one or more <em>direct addresses</em> in addition to the <a href="../type.NodeId.html" title="type iroh::NodeId"><code>NodeId</code></a>.</p>
<p>Since there is a conversion from <a href="../type.NodeId.html" title="type iroh::NodeId"><code>NodeId</code></a> to <a href="../struct.NodeAddr.html" title="struct iroh::NodeAddr"><code>NodeAddr</code></a>, you can also use
@@ -69,4 +69,4 @@ perform lookups to all discovery systems at the same time.</p>
Box::new(DnsDiscovery::n0_dns()),
Box::new(LocalSwarmDiscovery::new(secret_key.public())<span class="question-mark">?</span>),
]);</code></pre></div>
</div></details><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="dns/index.html" title="mod iroh::discovery::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 node discovery for iroh</div></li><li><div class="item-name"><a class="mod" href="local_swarm_discovery/index.html" title="mod iroh::discovery::local_swarm_discovery">local_<wbr>swarm_<wbr>discovery</a><wbr><span class="stab portability" title="Available on crate feature `discovery-local-network` only"><code>discovery-local-network</code></span></div><div class="desc docblock-short">A discovery service that uses an mdns-like service to discover local nodes.</div></li><li><div class="item-name"><a class="mod" href="pkarr/index.html" title="mod iroh::discovery::pkarr">pkarr</a></div><div class="desc docblock-short">A discovery service which publishes and resolves node information using a <a href="https://pkarr.org">pkarr</a> relay.</div></li><li><div class="item-name"><a class="mod" href="static_provider/index.html" title="mod iroh::discovery::static_provider">static_<wbr>provider</a></div><div class="desc docblock-short">A static node discovery to manually add node addressing information.</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.ConcurrentDiscovery.html" title="struct iroh::discovery::ConcurrentDiscovery">Concurrent<wbr>Discovery</a></div><div class="desc docblock-short">A discovery service that combines multiple discovery sources.</div></li><li><div class="item-name"><a class="struct" href="struct.DiscoveryItem.html" title="struct iroh::discovery::DiscoveryItem">Discovery<wbr>Item</a></div><div class="desc docblock-short">Node discovery results from <a href="trait.Discovery.html" title="trait iroh::discovery::Discovery"><code>Discovery</code></a> services.</div></li><li><div class="item-name"><a class="struct" href="struct.Lagged.html" title="struct iroh::discovery::Lagged">Lagged</a></div><div class="desc docblock-short">Error returned when a discovery watch stream lagged too far behind.</div></li><li><div class="item-name"><a class="struct" href="struct.NodeData.html" title="struct iroh::discovery::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::discovery::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></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.Discovery.html" title="trait iroh::discovery::Discovery">Discovery</a></div><div class="desc docblock-short">Node discovery for <a href="../endpoint/struct.Endpoint.html" title="struct iroh::endpoint::Endpoint"><code>super::Endpoint</code></a>.</div></li></ul></section></div></main></body></html>
</div></details><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="dns/index.html" title="mod iroh::discovery::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 node discovery for iroh</div></li><li><div class="item-name"><a class="mod" href="local_swarm_discovery/index.html" title="mod iroh::discovery::local_swarm_discovery">local_<wbr>swarm_<wbr>discovery</a><wbr><span class="stab portability" title="Available on crate feature `discovery-local-network` only"><code>discovery-local-network</code></span></div><div class="desc docblock-short">A discovery service that uses an mdns-like service to discover local nodes.</div></li><li><div class="item-name"><a class="mod" href="pkarr/index.html" title="mod iroh::discovery::pkarr">pkarr</a></div><div class="desc docblock-short">A discovery service which publishes and resolves node information using a <a href="https://pkarr.org">pkarr</a> relay.</div></li><li><div class="item-name"><a class="mod" href="static_provider/index.html" title="mod iroh::discovery::static_provider">static_<wbr>provider</a></div><div class="desc docblock-short">A static node discovery to manually add node addressing information.</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.ConcurrentDiscovery.html" title="struct iroh::discovery::ConcurrentDiscovery">Concurrent<wbr>Discovery</a></div><div class="desc docblock-short">A discovery service that combines multiple discovery sources.</div></li><li><div class="item-name"><a class="struct" href="struct.DiscoveryItem.html" title="struct iroh::discovery::DiscoveryItem">Discovery<wbr>Item</a></div><div class="desc docblock-short">Node discovery results from <a href="trait.Discovery.html" title="trait iroh::discovery::Discovery"><code>Discovery</code></a> services.</div></li><li><div class="item-name"><a class="struct" href="struct.Lagged.html" title="struct iroh::discovery::Lagged">Lagged</a></div><div class="desc docblock-short">Error returned when a discovery watch stream lagged too far behind.</div></li><li><div class="item-name"><a class="struct" href="struct.NodeData.html" title="struct iroh::discovery::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::discovery::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::discovery::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="../node_info/struct.UserData.html#associatedconstant.MAX_LENGTH" title="associated constant iroh::node_info::UserData::MAX_LENGTH"><code>UserData::MAX_LENGTH</code></a> bytes.</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.Discovery.html" title="trait iroh::discovery::Discovery">Discovery</a></div><div class="desc docblock-short">Node discovery for <a href="../endpoint/struct.Endpoint.html" title="struct iroh::endpoint::Endpoint"><code>super::Endpoint</code></a>.</div></li></ul></section></div></main></body></html>
@@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="A discovery service that uses an mdns-like service to discover local nodes."><title>iroh::discovery::local_swarm_discovery - 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.32.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module local_<wbr>swarm_<wbr>discovery</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="#constants" title="Constants">Constants</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In iroh::<wbr>discovery</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">discovery</a></span><h1>Module <span>local_swarm_discovery</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/discovery/local_swarm_discovery.rs.html#1-477">Source</a> </span></div><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>discovery-local-network</code></strong> only.</div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A discovery service that uses an mdns-like service to discover local 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="A discovery service that uses an mdns-like service to discover local nodes."><title>iroh::discovery::local_swarm_discovery - 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.32.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module local_<wbr>swarm_<wbr>discovery</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="#constants" title="Constants">Constants</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In iroh::<wbr>discovery</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">discovery</a></span><h1>Module <span>local_swarm_discovery</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/discovery/local_swarm_discovery.rs.html#1-507">Source</a> </span></div><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>discovery-local-network</code></strong> only.</div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A discovery service that uses an mdns-like service to discover local nodes.</p>
<p>This allows you to use an mdns-like swarm discovery service to find address information about nodes that are on your local network, no relay or outside internet needed.
See the <a href="https://crates.io/crates/swarm-discovery"><code>swarm-discovery</code></a> crate for more details.</p>
<p>When <a href="struct.LocalSwarmDiscovery.html" title="struct iroh::discovery::local_swarm_discovery::LocalSwarmDiscovery"><code>LocalSwarmDiscovery</code></a> is enabled, it’s possible to get a list of the locally discovered nodes by filtering a list of <code>RemoteInfo</code>s.</p>
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1 +1 @@
window.SIDEBAR_ITEMS = {"mod":["dns","local_swarm_discovery","pkarr","static_provider"],"struct":["ConcurrentDiscovery","DiscoveryItem","Lagged","NodeData","NodeInfo"],"trait":["Discovery"]};
window.SIDEBAR_ITEMS = {"mod":["dns","local_swarm_discovery","pkarr","static_provider"],"struct":["ConcurrentDiscovery","DiscoveryItem","Lagged","NodeData","NodeInfo","UserData"],"trait":["Discovery"]};
@@ -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="A static node discovery to manually add node addressing information."><title>iroh::discovery::static_provider - 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.32.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module static_<wbr>provider</a></h2><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In iroh::<wbr>discovery</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">discovery</a></span><h1>Module <span>static_provider</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/discovery/static_provider.rs.html#1-261">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A static node discovery to manually add node addressing information.</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="A static node discovery to manually add node addressing information."><title>iroh::discovery::static_provider - 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.32.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module static_<wbr>provider</a></h2><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In iroh::<wbr>discovery</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">discovery</a></span><h1>Module <span>static_provider</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/discovery/static_provider.rs.html#1-264">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A static node discovery to manually add node addressing information.</p>
<p>Often an application might get node addressing information out-of-band in an
application-specific way. <a href="https://docs.rs/iroh-base/latest/iroh_base/ticket/struct.NodeTicket"><code>NodeTicket</code></a>’s are one common way used to achieve this.
This “static” addressing information is often only usable for a limited time so needs to
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,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.32.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#1927">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.32.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#1956">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.32.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#1938-1944">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.32.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#1967-1973">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.32.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#1930-1932">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.32.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#1959-1961">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,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="Creates a `ServerConfig` with the given secret key and limits."><title>make_server_config 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.32.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">make_server_config</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#510-521">Source</a> </span></div><pre class="rust item-decl"><code>pub fn make_server_config(
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Creates a `ServerConfig` with the given secret key and limits."><title>make_server_config 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.32.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">make_server_config</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#526-537">Source</a> </span></div><pre class="rust item-decl"><code>pub fn make_server_config(
secret_key: &amp;<a class="struct" href="../struct.SecretKey.html" title="struct iroh::SecretKey">SecretKey</a>,
alpn_protocols: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</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;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;&gt;,
transport_config: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a>&lt;<a class="struct" href="struct.TransportConfig.html" title="struct iroh::endpoint::TransportConfig">TransportConfig</a>&gt;,
+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.32.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-2645">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.32.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-2674">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
+1 -1
View File
@@ -30,5 +30,5 @@ in <a href="https://www.rfc-editor.org/rfc/rfc1464">RFC1464</a>. The following
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.NodeData.html" title="struct iroh::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::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></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::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::node_info::NodeIdExt">Node<wbr>IdExt</a></div><div class="desc docblock-short">Extension methods for <a href="../type.NodeId.html" title="type iroh::NodeId"><code>NodeId</code></a> to encode to and decode from [<code>z32</code>],
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.MaxLengthExceededError.html" title="struct iroh::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::node_info::UserData"><code>UserData</code></a>.</div></li><li><div class="item-name"><a class="struct" href="struct.NodeData.html" title="struct iroh::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::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::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::node_info::UserData::MAX_LENGTH"><code>UserData::MAX_LENGTH</code></a> bytes.</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::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::node_info::NodeIdExt">Node<wbr>IdExt</a></div><div class="desc docblock-short">Extension methods for <a href="../type.NodeId.html" title="type iroh::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>
+1 -1
View File
@@ -1 +1 @@
window.SIDEBAR_ITEMS = {"constant":["IROH_TXT_NAME"],"struct":["NodeData","NodeInfo"],"trait":["NodeIdExt"]};
window.SIDEBAR_ITEMS = {"constant":["IROH_TXT_NAME"],"struct":["MaxLengthExceededError","NodeData","NodeInfo","UserData"],"trait":["NodeIdExt"]};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -1,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="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.32.0</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="#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-665">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>
<!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.32.0</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="#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-768">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>
@@ -30,5 +30,5 @@ in <a href="https://www.rfc-editor.org/rfc/rfc1464">RFC1464</a>. The following
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.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></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>],
</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="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>
@@ -1 +1 @@
window.SIDEBAR_ITEMS = {"constant":["IROH_TXT_NAME"],"struct":["NodeData","NodeInfo"],"trait":["NodeIdExt"]};
window.SIDEBAR_ITEMS = {"constant":["IROH_TXT_NAME"],"struct":["MaxLengthExceededError","NodeData","NodeInfo","UserData"],"trait":["NodeIdExt"]};
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
+14 -6
View File
@@ -1063,7 +1063,11 @@
<a href="#1062" id="1062">1062</a>
<a href="#1063" id="1063">1063</a>
<a href="#1064" id="1064">1064</a>
<a href="#1065" id="1065">1065</a></pre></div><pre class="rust"><code><span class="doccomment">//! Node address discovery.
<a href="#1065" id="1065">1065</a>
<a href="#1066" id="1066">1066</a>
<a href="#1067" id="1067">1067</a>
<a href="#1068" id="1068">1068</a>
<a href="#1069" id="1069">1069</a></pre></div><pre class="rust"><code><span class="doccomment">//! Node address discovery.
//!
//! To connect to an iroh node a [`NodeAddr`] is needed, which may contain a
//! [`RelayUrl`] or one or more *direct addresses* in addition to the [`NodeId`].
@@ -1184,7 +1188,7 @@
<span class="kw">use </span>tokio::sync::oneshot;
<span class="kw">use </span>tracing::{debug, error_span, warn, Instrument};
<span class="kw">pub use </span><span class="kw">crate</span>::node_info::{NodeData, NodeInfo};
<span class="kw">pub use </span><span class="kw">crate</span>::node_info::{NodeData, NodeInfo, UserData};
<span class="kw">use </span><span class="kw">crate</span>::Endpoint;
<span class="attr">#[cfg(not(wasm_browser))]
@@ -2004,7 +2008,7 @@
</span><span class="kw">mod </span>test_dns_pkarr {
<span class="kw">use </span>anyhow::Result;
<span class="kw">use </span>iroh_base::{NodeAddr, SecretKey};
<span class="kw">use </span>iroh_relay::RelayMap;
<span class="kw">use </span>iroh_relay::{dns::node_info::UserData, RelayMap};
<span class="kw">use </span>n0_future::time::Duration;
<span class="kw">use </span>tokio_util::task::AbortOnDropHandle;
<span class="kw">use </span>tracing_test::traced_test;
@@ -2058,20 +2062,24 @@
<span class="kw">let </span>resolver = DnsResolver::with_nameserver(dns_pkarr_server.nameserver);
<span class="kw">let </span>publisher = PkarrPublisher::new(secret_key, dns_pkarr_server.pkarr_url.clone());
<span class="kw">let </span>data = NodeData::new(relay_url.clone(), Default::default());
<span class="kw">let </span>user_data: UserData = <span class="string">"foobar"</span>.parse().unwrap();
<span class="kw">let </span>data = NodeData::new(relay_url.clone(), Default::default())
.with_user_data(<span class="prelude-val">Some</span>(user_data.clone()));
<span class="comment">// does not block, update happens in background task
</span>publisher.update_node_data(<span class="kw-2">&amp;</span>data);
<span class="comment">// wait until our shared state received the update from pkarr publishing
</span>dns_pkarr_server.on_node(<span class="kw-2">&amp;</span>node_id, PUBLISH_TIMEOUT).<span class="kw">await</span><span class="question-mark">?</span>;
<span class="kw">let </span>resolved = resolver.lookup_node_by_id(<span class="kw-2">&amp;</span>node_id, <span class="kw-2">&amp;</span>origin).<span class="kw">await</span><span class="question-mark">?</span>;
<span class="macro">println!</span>(<span class="string">"resolved {resolved:?}"</span>);
<span class="kw">let </span>expected = NodeAddr {
<span class="kw">let </span>expected_addr = NodeAddr {
node_id,
relay_url,
direct_addresses: Default::default(),
};
<span class="macro">assert_eq!</span>(resolved.to_node_addr(), expected);
<span class="macro">assert_eq!</span>(resolved.to_node_addr(), expected_addr);
<span class="macro">assert_eq!</span>(resolved.user_data(), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span>user_data));
<span class="prelude-val">Ok</span>(())
}
@@ -475,7 +475,37 @@
<a href="#474" id="474">474</a>
<a href="#475" id="475">475</a>
<a href="#476" id="476">476</a>
<a href="#477" id="477">477</a></pre></div><pre class="rust"><code><span class="doccomment">//! A discovery service that uses an mdns-like service to discover local nodes.
<a href="#477" id="477">477</a>
<a href="#478" id="478">478</a>
<a href="#479" id="479">479</a>
<a href="#480" id="480">480</a>
<a href="#481" id="481">481</a>
<a href="#482" id="482">482</a>
<a href="#483" id="483">483</a>
<a href="#484" id="484">484</a>
<a href="#485" id="485">485</a>
<a href="#486" id="486">486</a>
<a href="#487" id="487">487</a>
<a href="#488" id="488">488</a>
<a href="#489" id="489">489</a>
<a href="#490" id="490">490</a>
<a href="#491" id="491">491</a>
<a href="#492" id="492">492</a>
<a href="#493" id="493">493</a>
<a href="#494" id="494">494</a>
<a href="#495" id="495">495</a>
<a href="#496" id="496">496</a>
<a href="#497" id="497">497</a>
<a href="#498" id="498">498</a>
<a href="#499" id="499">499</a>
<a href="#500" id="500">500</a>
<a href="#501" id="501">501</a>
<a href="#502" id="502">502</a>
<a href="#503" id="503">503</a>
<a href="#504" id="504">504</a>
<a href="#505" id="505">505</a>
<a href="#506" id="506">506</a>
<a href="#507" id="507">507</a></pre></div><pre class="rust"><code><span class="doccomment">//! A discovery service that uses an mdns-like service to discover local nodes.
//!
//! This allows you to use an mdns-like swarm discovery service to find address information about nodes that are on your local network, no relay or outside internet needed.
//! See the [`swarm-discovery`](https://crates.io/crates/swarm-discovery) crate for more details.
@@ -540,6 +570,10 @@
/// Used in the [`crate::endpoint::Source::Discovery`] enum variant as the `name`.
</span><span class="kw">pub const </span>NAME: <span class="kw-2">&amp;</span>str = <span class="string">"local.swarm.discovery"</span>;
<span class="doccomment">/// The key of the attribute under which the `UserData` is stored in
/// the TXT record supported by swarm-discovery.
</span><span class="kw">const </span>USER_DATA_ATTRIBUTE: <span class="kw-2">&amp;</span>str = <span class="string">"user-data"</span>;
<span class="doccomment">/// How long we will wait before we stop sending discovery items
</span><span class="kw">const </span>DISCOVERY_DURATION: Duration = Duration::from_secs(<span class="number">10</span>);
@@ -648,6 +682,11 @@
<span class="kw">for </span>addr <span class="kw">in </span>addrs {
discovery.add(addr.<span class="number">0</span>, addr.<span class="number">1</span>)
}
<span class="kw">if let </span><span class="prelude-val">Some</span>(user_data) = data.user_data() {
<span class="kw">if let </span><span class="prelude-val">Err</span>(err) = discovery.set_txt_attribute(USER_DATA_ATTRIBUTE.to_string(), <span class="prelude-val">Some</span>(user_data.to_string())) {
<span class="macro">warn!</span>(<span class="string">"Failed to set the user-defined data in local swarm discovery: {err:?}"</span>);
}
}
<span class="kw">continue</span>;
}
};
@@ -825,7 +864,22 @@
.iter()
.map(|(ip, port)| SocketAddr::new(<span class="kw-2">*</span>ip, <span class="kw-2">*</span>port))
.collect();
<span class="kw">let </span>node_info = NodeInfo::new(<span class="kw-2">*</span>node_id).with_direct_addresses(direct_addresses);
<span class="comment">// Get the user-defined data from the resolved peer info. We expect an attribute with a value
// that parses as `UserData`. Otherwise, omit.
</span><span class="kw">let </span>user_data = <span class="kw">if let </span><span class="prelude-val">Some</span>(<span class="prelude-val">Some</span>(user_data)) = peer.txt_attribute(USER_DATA_ATTRIBUTE) {
<span class="kw">match </span>user_data.parse() {
<span class="prelude-val">Err</span>(err) =&gt; {
<span class="macro">debug!</span>(<span class="string">"failed to parse user data from TXT attribute: {err}"</span>);
<span class="prelude-val">None
</span>}
<span class="prelude-val">Ok</span>(data) =&gt; <span class="prelude-val">Some</span>(data),
}
} <span class="kw">else </span>{
<span class="prelude-val">None
</span>};
<span class="kw">let </span>node_info = NodeInfo::new(<span class="kw-2">*</span>node_id)
.with_direct_addresses(direct_addresses)
.with_user_data(user_data);
DiscoveryItem::new(node_info, NAME, <span class="prelude-val">None</span>)
}
@@ -874,6 +928,7 @@
<span class="kw">use </span>tracing_test::traced_test;
<span class="kw">use </span><span class="kw">super</span>::<span class="kw">super</span>::<span class="kw-2">*</span>;
<span class="kw">use </span><span class="kw">crate</span>::discovery::UserData;
<span class="attr">#[tokio::test]
#[traced_test]
@@ -882,7 +937,10 @@
<span class="kw">let </span>(node_id_b, discovery_b) = make_discoverer()<span class="question-mark">?</span>;
<span class="comment">// make addr info for discoverer b
</span><span class="kw">let </span>addr_info = NodeData::new(<span class="prelude-val">None</span>, BTreeSet::from([<span class="string">"0.0.0.0:11111"</span>.parse()<span class="question-mark">?</span>]));
</span><span class="kw">let </span>user_data: UserData = <span class="string">"foobar"</span>.parse()<span class="question-mark">?</span>;
<span class="kw">let </span>node_data = NodeData::new(<span class="prelude-val">None</span>, BTreeSet::from([<span class="string">"0.0.0.0:11111"</span>.parse()<span class="question-mark">?</span>]))
.with_user_data(<span class="prelude-val">Some</span>(user_data.clone()));
<span class="macro">println!</span>(<span class="string">"info {node_data:?}"</span>);
<span class="comment">// pass in endpoint, this is never used
</span><span class="kw">let </span>ep = <span class="kw">crate</span>::endpoint::Builder::default().bind().<span class="kw">await</span><span class="question-mark">?</span>;
@@ -893,15 +951,15 @@
<span class="macro">tracing::debug!</span>(<span class="question-mark">?</span>node_id_b, <span class="string">"Discovering node id b"</span>);
<span class="comment">// publish discovery_b's address
</span>discovery_b.publish(<span class="kw-2">&amp;</span>addr_info);
</span>discovery_b.publish(<span class="kw-2">&amp;</span>node_data);
<span class="kw">let </span>s1_res = tokio::time::timeout(Duration::from_secs(<span class="number">5</span>), s1.next())
.<span class="kw">await</span><span class="question-mark">?
</span>.unwrap()<span class="question-mark">?</span>;
<span class="kw">let </span>s2_res = tokio::time::timeout(Duration::from_secs(<span class="number">5</span>), s2.next())
.<span class="kw">await</span><span class="question-mark">?
</span>.unwrap()<span class="question-mark">?</span>;
<span class="macro">assert_eq!</span>(s1_res.node_info().data, addr_info);
<span class="macro">assert_eq!</span>(s2_res.node_info().data, addr_info);
<span class="macro">assert_eq!</span>(s1_res.node_info().data, node_data);
<span class="macro">assert_eq!</span>(s2_res.node_info().data, node_data);
<span class="prelude-val">Ok</span>(())
}
@@ -914,12 +972,14 @@
<span class="kw">let </span><span class="kw-2">mut </span>discoverers = <span class="macro">vec!</span>[];
<span class="kw">let </span>(<span class="kw">_</span>, discovery) = make_discoverer()<span class="question-mark">?</span>;
<span class="kw">let </span>addr_info = NodeData::new(<span class="prelude-val">None</span>, BTreeSet::from([<span class="string">"0.0.0.0:11111"</span>.parse()<span class="question-mark">?</span>]));
<span class="kw">let </span>node_data = NodeData::new(<span class="prelude-val">None</span>, BTreeSet::from([<span class="string">"0.0.0.0:11111"</span>.parse()<span class="question-mark">?</span>]));
<span class="kw">for _ in </span><span class="number">0</span>..num_nodes {
<span class="kw">for </span>i <span class="kw">in </span><span class="number">0</span>..num_nodes {
<span class="kw">let </span>(node_id, discovery) = make_discoverer()<span class="question-mark">?</span>;
node_ids.insert(node_id);
discovery.publish(<span class="kw-2">&amp;</span>addr_info);
<span class="kw">let </span>user_data: UserData = <span class="macro">format!</span>(<span class="string">"node{i}"</span>).parse()<span class="question-mark">?</span>;
<span class="kw">let </span>node_data = node_data.clone().with_user_data(<span class="prelude-val">Some</span>(user_data.clone()));
node_ids.insert((node_id, <span class="prelude-val">Some</span>(user_data)));
discovery.publish(<span class="kw-2">&amp;</span>node_data);
discoverers.push(discovery);
}
@@ -929,8 +989,8 @@
<span class="kw">let </span><span class="kw-2">mut </span>got_ids = BTreeSet::new();
<span class="kw">while </span>got_ids.len() != num_nodes {
<span class="kw">if let </span><span class="prelude-val">Some</span>(item) = events.next().<span class="kw">await </span>{
<span class="kw">if </span>node_ids.contains(<span class="kw-2">&amp;</span>item.node_id()) {
got_ids.insert(item.node_id());
<span class="kw">if </span>node_ids.contains(<span class="kw-2">&amp;</span>(item.node_id(), item.user_data().cloned())) {
got_ids.insert((item.node_id(), item.user_data().cloned()));
}
} <span class="kw">else </span>{
<span class="macro">anyhow::bail!</span>(
@@ -259,7 +259,10 @@
<a href="#258" id="258">258</a>
<a href="#259" id="259">259</a>
<a href="#260" id="260">260</a>
<a href="#261" id="261">261</a></pre></div><pre class="rust"><code><span class="doccomment">//! A static node discovery to manually add node addressing information.
<a href="#261" id="261">261</a>
<a href="#262" id="262">262</a>
<a href="#263" id="263">263</a>
<a href="#264" id="264">264</a></pre></div><pre class="rust"><code><span class="doccomment">//! A static node discovery to manually add node addressing information.
//!
//! Often an application might get node addressing information out-of-band in an
//! application-specific way. [`NodeTicket`]'s are one common way used to achieve this.
@@ -421,6 +424,7 @@
.data
.add_direct_addresses(data.direct_addresses().iter().copied());
existing.data.set_relay_url(data.relay_url().cloned());
existing.data.set_user_data(data.user_data().cloned());
existing.last_updated = last_updated;
}
Entry::Vacant(entry) =&gt; {
@@ -502,12 +506,14 @@
relay_url: <span class="prelude-val">Some</span>(<span class="string">"https://example.com"</span>.parse()<span class="question-mark">?</span>),
direct_addresses: Default::default(),
};
<span class="kw">let </span>node_info = NodeInfo::from(addr.clone());
<span class="kw">let </span>user_data = <span class="prelude-val">Some</span>(<span class="string">"foobar"</span>.parse().unwrap());
<span class="kw">let </span>node_info = NodeInfo::from(addr.clone()).with_user_data(user_data.clone());
discovery.add_node_info(node_info.clone());
<span class="kw">let </span>back = discovery.get_node_info(key.public()).context(<span class="string">"no addr"</span>)<span class="question-mark">?</span>;
<span class="macro">assert_eq!</span>(back, node_info);
<span class="macro">assert_eq!</span>(back.user_data(), user_data.as_ref());
<span class="macro">assert_eq!</span>(back.into_node_addr(), addr);
<span class="kw">let </span>removed = discovery
+60 -2
View File
@@ -2643,7 +2643,36 @@
<a href="#2642" id="2642">2642</a>
<a href="#2643" id="2643">2643</a>
<a href="#2644" id="2644">2644</a>
<a href="#2645" id="2645">2645</a></pre></div><pre class="rust"><code><span class="doccomment">//! The [`Endpoint`] allows establishing connections to other iroh nodes.
<a href="#2645" id="2645">2645</a>
<a href="#2646" id="2646">2646</a>
<a href="#2647" id="2647">2647</a>
<a href="#2648" id="2648">2648</a>
<a href="#2649" id="2649">2649</a>
<a href="#2650" id="2650">2650</a>
<a href="#2651" id="2651">2651</a>
<a href="#2652" id="2652">2652</a>
<a href="#2653" id="2653">2653</a>
<a href="#2654" id="2654">2654</a>
<a href="#2655" id="2655">2655</a>
<a href="#2656" id="2656">2656</a>
<a href="#2657" id="2657">2657</a>
<a href="#2658" id="2658">2658</a>
<a href="#2659" id="2659">2659</a>
<a href="#2660" id="2660">2660</a>
<a href="#2661" id="2661">2661</a>
<a href="#2662" id="2662">2662</a>
<a href="#2663" id="2663">2663</a>
<a href="#2664" id="2664">2664</a>
<a href="#2665" id="2665">2665</a>
<a href="#2666" id="2666">2666</a>
<a href="#2667" id="2667">2667</a>
<a href="#2668" id="2668">2668</a>
<a href="#2669" id="2669">2669</a>
<a href="#2670" id="2670">2670</a>
<a href="#2671" id="2671">2671</a>
<a href="#2672" id="2672">2672</a>
<a href="#2673" id="2673">2673</a>
<a href="#2674" id="2674">2674</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
@@ -2682,7 +2711,7 @@
<span class="kw">use crate</span>::{
discovery::{
pkarr::PkarrPublisher, ConcurrentDiscovery, Discovery, DiscoveryItem, DiscoverySubscribers,
DiscoveryTask, Lagged,
DiscoveryTask, Lagged, UserData,
},
magicsock::{<span class="self">self</span>, Handle, NodeIdMappedAddr},
tls,
@@ -2759,6 +2788,7 @@
keylog: bool,
<span class="attr">#[debug(skip)]
</span>discovery: Vec&lt;DiscoveryBuilder&gt;,
discovery_user_data: <span class="prelude-ty">Option</span>&lt;UserData&gt;,
proxy_url: <span class="prelude-ty">Option</span>&lt;Url&gt;,
<span class="doccomment">/// List of known nodes. See [`Builder::known_nodes`].
</span>node_map: <span class="prelude-ty">Option</span>&lt;Vec&lt;NodeAddr&gt;&gt;,
@@ -2783,6 +2813,7 @@
transport_config,
keylog: Default::default(),
discovery: Default::default(),
discovery_user_data: Default::default(),
proxy_url: <span class="prelude-val">None</span>,
node_map: <span class="prelude-val">None</span>,
<span class="attr">#[cfg(not(wasm_browser))]
@@ -2835,6 +2866,7 @@
relay_map,
node_map: <span class="self">self</span>.node_map,
discovery,
discovery_user_data: <span class="self">self</span>.discovery_user_data,
proxy_url: <span class="self">self</span>.proxy_url,
<span class="attr">#[cfg(not(wasm_browser))]
</span>dns_resolver,
@@ -3041,6 +3073,19 @@
<span class="self">self
</span>}
<span class="doccomment">/// Sets the initial user-defined data to be published in discovery services for this node.
///
/// When using discovery services, this string of [`UserData`] will be published together
/// with the node's addresses and relay URL. When other nodes discover this node,
/// they retrieve the [`UserData`] in addition to the addressing info.
///
/// Iroh itself does not interpret the user-defined data in any way, it is purely left
/// for applications to parse and use.
</span><span class="kw">pub fn </span>user_data_for_discovery(<span class="kw-2">mut </span><span class="self">self</span>, user_data: UserData) -&gt; <span class="self">Self </span>{
<span class="self">self</span>.discovery_user_data = <span class="prelude-val">Some</span>(user_data);
<span class="self">self
</span>}
<span class="doccomment">/// Optionally set a list of known nodes.
</span><span class="kw">pub fn </span>known_nodes(<span class="kw-2">mut </span><span class="self">self</span>, nodes: Vec&lt;NodeAddr&gt;) -&gt; <span class="self">Self </span>{
<span class="self">self</span>.node_map = <span class="prelude-val">Some</span>(nodes);
@@ -3725,6 +3770,19 @@
<span class="self">self</span>.msock.network_change().<span class="kw">await</span>;
}
<span class="comment">// # Methods to update internal state.
</span><span class="doccomment">/// Sets the initial user-defined data to be published in discovery services for this node.
///
/// If the user-defined data passed to this function is different to the previous one,
/// the endpoint will republish its node info to the configured discovery services.
///
/// See also [`Builder::user_data_for_discovery`] for setting an initial value when
/// building the endpoint.
</span><span class="kw">pub fn </span>set_user_data_for_discovery(<span class="kw-2">&amp;</span><span class="self">self</span>, user_data: <span class="prelude-ty">Option</span>&lt;UserData&gt;) {
<span class="self">self</span>.msock.set_user_data_for_discovery(user_data);
}
<span class="comment">// # Methods for terminating the endpoint.
</span><span class="doccomment">/// Closes the QUIC endpoint and the magic socket.
+53 -3
View File
@@ -4610,7 +4610,32 @@
<a href="#4609" id="4609">4609</a>
<a href="#4610" id="4610">4610</a>
<a href="#4611" id="4611">4611</a>
<a href="#4612" id="4612">4612</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="#4612" id="4612">4612</a>
<a href="#4613" id="4613">4613</a>
<a href="#4614" id="4614">4614</a>
<a href="#4615" id="4615">4615</a>
<a href="#4616" id="4616">4616</a>
<a href="#4617" id="4617">4617</a>
<a href="#4618" id="4618">4618</a>
<a href="#4619" id="4619">4619</a>
<a href="#4620" id="4620">4620</a>
<a href="#4621" id="4621">4621</a>
<a href="#4622" id="4622">4622</a>
<a href="#4623" id="4623">4623</a>
<a href="#4624" id="4624">4624</a>
<a href="#4625" id="4625">4625</a>
<a href="#4626" id="4626">4626</a>
<a href="#4627" id="4627">4627</a>
<a href="#4628" id="4628">4628</a>
<a href="#4629" id="4629">4629</a>
<a href="#4630" id="4630">4630</a>
<a href="#4631" id="4631">4631</a>
<a href="#4632" id="4632">4632</a>
<a href="#4633" id="4633">4633</a>
<a href="#4634" id="4634">4634</a>
<a href="#4635" id="4635">4635</a>
<a href="#4636" id="4636">4636</a>
<a href="#4637" id="4637">4637</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
//!
@@ -4684,7 +4709,7 @@
<span class="kw">use crate</span>::{
defaults::timeouts::NET_REPORT_TIMEOUT,
disco::{<span class="self">self</span>, CallMeMaybe, SendAddr},
discovery::{Discovery, DiscoveryItem, DiscoverySubscribers, NodeData},
discovery::{Discovery, DiscoveryItem, DiscoverySubscribers, NodeData, UserData},
key::{public_ed_box, secret_ed_box, DecryptionError, SharedSecret},
watchable::{Watchable, Watcher},
};
@@ -4732,6 +4757,9 @@
<span class="doccomment">/// Optional node discovery mechanism.
</span><span class="kw">pub</span>(<span class="kw">crate</span>) discovery: <span class="prelude-ty">Option</span>&lt;Box&lt;<span class="kw">dyn </span>Discovery&gt;&gt;,
<span class="doccomment">/// Optional user-defined discovery data.
</span><span class="kw">pub</span>(<span class="kw">crate</span>) discovery_user_data: <span class="prelude-ty">Option</span>&lt;UserData&gt;,
<span class="doccomment">/// A DNS resolver to use for resolving relay URLs.
///
/// You can use [`crate::dns::DnsResolver::new`] for a resolver
@@ -4768,6 +4796,7 @@
relay_map: RelayMap::empty(),
node_map: <span class="prelude-val">None</span>,
discovery: <span class="prelude-val">None</span>,
discovery_user_data: <span class="prelude-val">None</span>,
proxy_url: <span class="prelude-val">None</span>,
<span class="attr">#[cfg(not(wasm_browser))]
</span>dns_resolver: DnsResolver::new(),
@@ -4884,6 +4913,9 @@
<span class="doccomment">/// Optional discovery service
</span>discovery: <span class="prelude-ty">Option</span>&lt;Box&lt;<span class="kw">dyn </span>Discovery&gt;&gt;,
<span class="doccomment">/// Optional user-defined discover data.
</span>discovery_user_data: RwLock&lt;<span class="prelude-ty">Option</span>&lt;UserData&gt;&gt;,
<span class="doccomment">/// Our discovered direct addresses.
</span>direct_addrs: DiscoveredDirectAddrs,
@@ -5053,6 +5085,16 @@
<span class="self">self</span>.discovery.as_ref().map(Box::as_ref)
}
<span class="doccomment">/// Updates the user-defined discovery data for this node.
</span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>set_user_data_for_discovery(<span class="kw-2">&amp;</span><span class="self">self</span>, user_data: <span class="prelude-ty">Option</span>&lt;UserData&gt;) {
<span class="kw">let </span><span class="kw-2">mut </span>guard = <span class="self">self</span>.discovery_user_data.write().expect(<span class="string">"lock poisened"</span>);
<span class="kw">if </span><span class="kw-2">*</span>guard != user_data {
<span class="kw-2">*</span>guard = user_data;
drop(guard);
<span class="self">self</span>.publish_my_addr();
}
}
<span class="doccomment">/// Call to notify the system of potential network changes.
</span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">async fn </span>network_change(<span class="kw-2">&amp;</span><span class="self">self</span>) {
<span class="self">self</span>.actor_sender
@@ -6147,7 +6189,12 @@
<span class="kw">if let </span><span class="prelude-val">Some</span>(<span class="kw-2">ref </span>discovery) = <span class="self">self</span>.discovery {
<span class="kw">let </span>relay_url = <span class="self">self</span>.my_relay();
<span class="kw">let </span>direct_addrs = <span class="self">self</span>.direct_addrs.sockaddrs();
<span class="kw">let </span>data = NodeData::new(relay_url, direct_addrs);
<span class="kw">let </span>user_data = <span class="self">self
</span>.discovery_user_data
.read()
.expect(<span class="string">"lock poisened"</span>)
.clone();
<span class="kw">let </span>data = NodeData::new(relay_url, direct_addrs).with_user_data(user_data);
discovery.publish(<span class="kw-2">&amp;</span>data);
}
}
@@ -6293,6 +6340,7 @@
relay_map,
node_map,
discovery,
discovery_user_data,
<span class="attr">#[cfg(not(wasm_browser))]
</span>dns_resolver,
proxy_url,
@@ -6383,6 +6431,7 @@
</span>ip_mapped_addrs,
udp_disco_sender,
discovery,
discovery_user_data: RwLock::new(discovery_user_data),
direct_addrs: Default::default(),
pending_call_me_maybes: Default::default(),
direct_addr_update_state: DirectAddrUpdateState::new(),
@@ -8854,6 +8903,7 @@
relay_map: RelayMap::empty(),
node_map: <span class="prelude-val">None</span>,
discovery: <span class="prelude-val">None</span>,
discovery_user_data: <span class="prelude-val">None</span>,
dns_resolver,
proxy_url: <span class="prelude-val">None</span>,
server_config,
+211 -5
View File
@@ -663,7 +663,110 @@
<a href="#662" id="662">662</a>
<a href="#663" id="663">663</a>
<a href="#664" id="664">664</a>
<a href="#665" id="665">665</a></pre></div><pre class="rust"><code><span class="doccomment">//! Support for handling DNS resource records for dialing by [`NodeId`].
<a href="#665" id="665">665</a>
<a href="#666" id="666">666</a>
<a href="#667" id="667">667</a>
<a href="#668" id="668">668</a>
<a href="#669" id="669">669</a>
<a href="#670" id="670">670</a>
<a href="#671" id="671">671</a>
<a href="#672" id="672">672</a>
<a href="#673" id="673">673</a>
<a href="#674" id="674">674</a>
<a href="#675" id="675">675</a>
<a href="#676" id="676">676</a>
<a href="#677" id="677">677</a>
<a href="#678" id="678">678</a>
<a href="#679" id="679">679</a>
<a href="#680" id="680">680</a>
<a href="#681" id="681">681</a>
<a href="#682" id="682">682</a>
<a href="#683" id="683">683</a>
<a href="#684" id="684">684</a>
<a href="#685" id="685">685</a>
<a href="#686" id="686">686</a>
<a href="#687" id="687">687</a>
<a href="#688" id="688">688</a>
<a href="#689" id="689">689</a>
<a href="#690" id="690">690</a>
<a href="#691" id="691">691</a>
<a href="#692" id="692">692</a>
<a href="#693" id="693">693</a>
<a href="#694" id="694">694</a>
<a href="#695" id="695">695</a>
<a href="#696" id="696">696</a>
<a href="#697" id="697">697</a>
<a href="#698" id="698">698</a>
<a href="#699" id="699">699</a>
<a href="#700" id="700">700</a>
<a href="#701" id="701">701</a>
<a href="#702" id="702">702</a>
<a href="#703" id="703">703</a>
<a href="#704" id="704">704</a>
<a href="#705" id="705">705</a>
<a href="#706" id="706">706</a>
<a href="#707" id="707">707</a>
<a href="#708" id="708">708</a>
<a href="#709" id="709">709</a>
<a href="#710" id="710">710</a>
<a href="#711" id="711">711</a>
<a href="#712" id="712">712</a>
<a href="#713" id="713">713</a>
<a href="#714" id="714">714</a>
<a href="#715" id="715">715</a>
<a href="#716" id="716">716</a>
<a href="#717" id="717">717</a>
<a href="#718" id="718">718</a>
<a href="#719" id="719">719</a>
<a href="#720" id="720">720</a>
<a href="#721" id="721">721</a>
<a href="#722" id="722">722</a>
<a href="#723" id="723">723</a>
<a href="#724" id="724">724</a>
<a href="#725" id="725">725</a>
<a href="#726" id="726">726</a>
<a href="#727" id="727">727</a>
<a href="#728" id="728">728</a>
<a href="#729" id="729">729</a>
<a href="#730" id="730">730</a>
<a href="#731" id="731">731</a>
<a href="#732" id="732">732</a>
<a href="#733" id="733">733</a>
<a href="#734" id="734">734</a>
<a href="#735" id="735">735</a>
<a href="#736" id="736">736</a>
<a href="#737" id="737">737</a>
<a href="#738" id="738">738</a>
<a href="#739" id="739">739</a>
<a href="#740" id="740">740</a>
<a href="#741" id="741">741</a>
<a href="#742" id="742">742</a>
<a href="#743" id="743">743</a>
<a href="#744" id="744">744</a>
<a href="#745" id="745">745</a>
<a href="#746" id="746">746</a>
<a href="#747" id="747">747</a>
<a href="#748" id="748">748</a>
<a href="#749" id="749">749</a>
<a href="#750" id="750">750</a>
<a href="#751" id="751">751</a>
<a href="#752" id="752">752</a>
<a href="#753" id="753">753</a>
<a href="#754" id="754">754</a>
<a href="#755" id="755">755</a>
<a href="#756" id="756">756</a>
<a href="#757" id="757">757</a>
<a href="#758" id="758">758</a>
<a href="#759" id="759">759</a>
<a href="#760" id="760">760</a>
<a href="#761" id="761">761</a>
<a href="#762" id="762">762</a>
<a href="#763" id="763">763</a>
<a href="#764" id="764">764</a>
<a href="#765" id="765">765</a>
<a href="#766" id="766">766</a>
<a href="#767" id="767">767</a>
<a href="#768" id="768">768</a></pre></div><pre class="rust"><code><span class="doccomment">//! Support for handling DNS resource records for dialing by [`NodeId`].
//!
//! Dialing by [`NodeId`] is supported by iroh nodes publishing [Pkarr] records to DNS
//! servers or the Mainline DHT. This module supports creating and parsing these records.
@@ -699,7 +802,7 @@
</span><span class="kw">use </span>std::{
collections::{BTreeMap, BTreeSet},
fmt::Display,
fmt::{<span class="self">self</span>, Display},
hash::Hash,
net::SocketAddr,
str::FromStr,
@@ -748,7 +851,9 @@
<span class="doccomment">/// Data about a node that may be published to and resolved from discovery services.
///
/// This includes an optional [`RelayUrl`] and a set of direct addresses.
/// This includes an optional [`RelayUrl`], a set of direct addresses, and the optional
/// [`UserData`], a string that can be set by applications and is not parsed or used by iroh
/// itself.
///
/// This struct does not include the node's [`NodeId`], only the data *about* a certain
/// node. See [`NodeInfo`] for a struct that contains a [`NodeId`] with associated [`NodeData`].
@@ -758,6 +863,8 @@
</span>relay_url: <span class="prelude-ty">Option</span>&lt;RelayUrl&gt;,
<span class="doccomment">/// Direct addresses where this node can be reached.
</span>direct_addresses: BTreeSet&lt;SocketAddr&gt;,
<span class="doccomment">/// Optional user-defined [`UserData`] for this node.
</span>user_data: <span class="prelude-ty">Option</span>&lt;UserData&gt;,
}
<span class="kw">impl </span>NodeData {
@@ -766,6 +873,7 @@
<span class="self">Self </span>{
relay_url,
direct_addresses,
user_data: <span class="prelude-val">None</span>,
}
}
@@ -781,11 +889,22 @@
<span class="self">self
</span>}
<span class="doccomment">/// Sets the user-defined data and returns the updated node data.
</span><span class="kw">pub fn </span>with_user_data(<span class="kw-2">mut </span><span class="self">self</span>, user_data: <span class="prelude-ty">Option</span>&lt;UserData&gt;) -&gt; <span class="self">Self </span>{
<span class="self">self</span>.user_data = user_data;
<span class="self">self
</span>}
<span class="doccomment">/// Returns the relay URL of the node.
</span><span class="kw">pub fn </span>relay_url(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="prelude-ty">Option</span>&lt;<span class="kw-2">&amp;</span>RelayUrl&gt; {
<span class="self">self</span>.relay_url.as_ref()
}
<span class="doccomment">/// Returns the optional user-defined data of the node.
</span><span class="kw">pub fn </span>user_data(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="prelude-ty">Option</span>&lt;<span class="kw-2">&amp;</span>UserData&gt; {
<span class="self">self</span>.user_data.as_ref()
}
<span class="doccomment">/// Returns the direct addresses of the node.
</span><span class="kw">pub fn </span>direct_addresses(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;</span>BTreeSet&lt;SocketAddr&gt; {
<span class="kw-2">&amp;</span><span class="self">self</span>.direct_addresses
@@ -805,6 +924,11 @@
</span><span class="kw">pub fn </span>set_relay_url(<span class="kw-2">&amp;mut </span><span class="self">self</span>, relay_url: <span class="prelude-ty">Option</span>&lt;RelayUrl&gt;) {
<span class="self">self</span>.relay_url = relay_url
}
<span class="doccomment">/// Sets the user-defined data of the node data.
</span><span class="kw">pub fn </span>set_user_data(<span class="kw-2">&amp;mut </span><span class="self">self</span>, user_data: <span class="prelude-ty">Option</span>&lt;UserData&gt;) {
<span class="self">self</span>.user_data = user_data;
}
}
<span class="kw">impl </span>From&lt;NodeAddr&gt; <span class="kw">for </span>NodeData {
@@ -812,10 +936,72 @@
<span class="self">Self </span>{
relay_url: node_addr.relay_url,
direct_addresses: node_addr.direct_addresses,
user_data: <span class="prelude-val">None</span>,
}
}
}
<span class="comment">// User-defined data that can be published and resolved through node discovery.
</span><span class="doccomment">///
/// Under the hood this is a UTF-8 String is no longer than [`UserData::MAX_LENGTH`] bytes.
///
/// Iroh does not keep track of or examine the user-defined data.
///
/// `UserData` implements [`FromStr`] and [`TryFrom&lt;String&gt;`], so you can
/// convert `&amp;str` and `String` into `UserData` easily.
</span><span class="attr">#[derive(Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
</span><span class="kw">pub struct </span>UserData(String);
<span class="kw">impl </span>UserData {
<span class="doccomment">/// The max byte length allowed for user-defined data.
///
/// In DNS discovery services, the user-defined data is stored in a TXT record character string,
/// which has a max length of 255 bytes. We need to subtract the `user-data=` prefix,
/// which leaves 245 bytes for the actual user-defined data.
</span><span class="kw">pub const </span>MAX_LENGTH: usize = <span class="number">245</span>;
}
<span class="doccomment">/// Error returned when an input value is too long for [`UserData`].
</span><span class="attr">#[derive(Debug, thiserror::Error)]
#[error(<span class="string">"User-defined data exceeds max length"</span>)]
</span><span class="kw">pub struct </span>MaxLengthExceededError;
<span class="kw">impl </span>TryFrom&lt;String&gt; <span class="kw">for </span>UserData {
<span class="kw">type </span>Error = MaxLengthExceededError;
<span class="kw">fn </span>try_from(value: String) -&gt; <span class="prelude-ty">Result</span>&lt;<span class="self">Self</span>, <span class="self">Self</span>::Error&gt; {
<span class="kw">if </span>value.len() &gt; <span class="self">Self</span>::MAX_LENGTH {
<span class="prelude-val">Err</span>(MaxLengthExceededError)
} <span class="kw">else </span>{
<span class="prelude-val">Ok</span>(<span class="self">Self</span>(value))
}
}
}
<span class="kw">impl </span>FromStr <span class="kw">for </span>UserData {
<span class="kw">type </span><span class="prelude-val">Err </span>= MaxLengthExceededError;
<span class="kw">fn </span>from_str(s: <span class="kw-2">&amp;</span>str) -&gt; std::result::Result&lt;<span class="self">Self</span>, <span class="self">Self</span>::Err&gt; {
<span class="kw">if </span>s.len() &gt; <span class="self">Self</span>::MAX_LENGTH {
<span class="prelude-val">Err</span>(MaxLengthExceededError)
} <span class="kw">else </span>{
<span class="prelude-val">Ok</span>(<span class="self">Self</span>(s.to_string()))
}
}
}
<span class="kw">impl </span>fmt::Display <span class="kw">for </span>UserData {
<span class="kw">fn </span>fmt(<span class="kw-2">&amp;</span><span class="self">self</span>, f: <span class="kw-2">&amp;mut </span>fmt::Formatter&lt;<span class="lifetime">'_</span>&gt;) -&gt; fmt::Result {
<span class="macro">write!</span>(f, <span class="string">"{}"</span>, <span class="self">self</span>.<span class="number">0</span>)
}
}
<span class="kw">impl </span>AsRef&lt;str&gt; <span class="kw">for </span>UserData {
<span class="kw">fn </span>as_ref(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;</span>str {
<span class="kw-2">&amp;</span><span class="self">self</span>.<span class="number">0
</span>}
}
<span class="doccomment">/// Information about a node that may be published to and resolved from discovery services.
///
/// This struct couples a [`NodeId`] with its associated [`NodeData`].
@@ -849,9 +1035,16 @@
.flatten()
.filter_map(|s| SocketAddr::from_str(s).ok())
.collect();
<span class="kw">let </span>user_data = attrs
.get(<span class="kw-2">&amp;</span>IrohAttr::UserData)
.into_iter()
.flatten()
.next()
.and_then(|s| UserData::from_str(s).ok());
<span class="kw">let </span>data = NodeData {
relay_url: relay_url.map(Into::into),
direct_addresses,
user_data,
};
<span class="self">Self </span>{ node_id, data }
}
@@ -894,6 +1087,12 @@
<span class="self">self
</span>}
<span class="doccomment">/// Sets the user-defined data and returns the updated node info.
</span><span class="kw">pub fn </span>with_user_data(<span class="kw-2">mut </span><span class="self">self</span>, user_data: <span class="prelude-ty">Option</span>&lt;UserData&gt;) -&gt; <span class="self">Self </span>{
<span class="self">self</span>.data = <span class="self">self</span>.data.with_user_data(user_data);
<span class="self">self
</span>}
<span class="doccomment">/// Converts into a [`NodeAddr`] by cloning the needed fields.
</span><span class="kw">pub fn </span>to_node_addr(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; NodeAddr {
NodeAddr {
@@ -991,6 +1190,8 @@
</span>Relay,
<span class="doccomment">/// Direct address.
</span>Addr,
<span class="doccomment">/// User-defined data
</span>UserData,
}
<span class="doccomment">/// Attributes parsed from [`IROH_TXT_NAME`] TXT records.
@@ -1013,6 +1214,9 @@
<span class="kw">for </span>addr <span class="kw">in </span><span class="kw-2">&amp;</span>info.data.direct_addresses {
attrs.push((IrohAttr::Addr, addr.to_string()));
}
<span class="kw">if let </span><span class="prelude-val">Some</span>(user_data) = <span class="kw-2">&amp;</span>info.data.user_data {
attrs.push((IrohAttr::UserData, user_data.to_string()));
}
<span class="self">Self</span>::from_parts(info.node_id, attrs.into_iter())
}
}
@@ -1229,7 +1433,8 @@
<span class="kw">let </span>node_data = NodeData::new(
<span class="prelude-val">Some</span>(<span class="string">"https://example.com"</span>.parse().unwrap()),
[<span class="string">"127.0.0.1:1234"</span>.parse().unwrap()].into_iter().collect(),
);
)
.with_user_data(<span class="prelude-val">Some</span>(<span class="string">"foobar"</span>.parse().unwrap()));
<span class="kw">let </span>node_id = <span class="string">"vpnk377obfvzlipnsfbqba7ywkkenc4xlpmovt5tsfujoa75zqia"
</span>.parse()
.unwrap();
@@ -1246,7 +1451,8 @@
<span class="kw">let </span>node_data = NodeData::new(
<span class="prelude-val">Some</span>(<span class="string">"https://example.com"</span>.parse().unwrap()),
[<span class="string">"127.0.0.1:1234"</span>.parse().unwrap()].into_iter().collect(),
);
)
.with_user_data(<span class="prelude-val">Some</span>(<span class="string">"foobar"</span>.parse().unwrap()));
<span class="kw">let </span>expected = NodeInfo::from_parts(secret_key.public(), node_data);
<span class="kw">let </span>packet = expected.to_pkarr_signed_packet(<span class="kw-2">&amp;</span>secret_key, <span class="number">30</span>).unwrap();
<span class="kw">let </span>actual = NodeInfo::from_pkarr_signed_packet(<span class="kw-2">&amp;</span>packet).unwrap();
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 @@
(function() {
var implementors = Object.fromEntries([["iroh",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html\" title=\"trait core::cmp::Ord\">Ord</a> for <a class=\"enum\" href=\"iroh/endpoint/enum.DirectAddrType.html\" title=\"enum iroh::endpoint::DirectAddrType\">DirectAddrType</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html\" title=\"trait core::cmp::Ord\">Ord</a> for <a class=\"struct\" href=\"iroh/endpoint/struct.DirectAddr.html\" title=\"struct iroh::endpoint::DirectAddr\">DirectAddr</a>"]]],["iroh_base",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html\" title=\"trait core::cmp::Ord\">Ord</a> for <a class=\"struct\" href=\"iroh_base/struct.NodeAddr.html\" title=\"struct iroh_base::NodeAddr\">NodeAddr</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html\" title=\"trait core::cmp::Ord\">Ord</a> for <a class=\"struct\" href=\"iroh_base/struct.PublicKey.html\" title=\"struct iroh_base::PublicKey\">PublicKey</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html\" title=\"trait core::cmp::Ord\">Ord</a> for <a class=\"struct\" href=\"iroh_base/struct.RelayUrl.html\" title=\"struct iroh_base::RelayUrl\">RelayUrl</a>"]]],["iroh_net_report",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html\" title=\"trait core::cmp::Ord\">Ord</a> for <a class=\"struct\" href=\"iroh_net_report/struct.IpMappedAddr.html\" title=\"struct iroh_net_report::IpMappedAddr\">IpMappedAddr</a>"]]],["iroh_relay",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html\" title=\"trait core::cmp::Ord\">Ord</a> for <a class=\"struct\" href=\"iroh_relay/struct.RelayNode.html\" title=\"struct iroh_relay::RelayNode\">RelayNode</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html\" title=\"trait core::cmp::Ord\">Ord</a> for <a class=\"struct\" href=\"iroh_relay/struct.RelayQuicConfig.html\" title=\"struct iroh_relay::RelayQuicConfig\">RelayQuicConfig</a>"]]]]);
var implementors = Object.fromEntries([["iroh",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html\" title=\"trait core::cmp::Ord\">Ord</a> for <a class=\"enum\" href=\"iroh/endpoint/enum.DirectAddrType.html\" title=\"enum iroh::endpoint::DirectAddrType\">DirectAddrType</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html\" title=\"trait core::cmp::Ord\">Ord</a> for <a class=\"struct\" href=\"iroh/endpoint/struct.DirectAddr.html\" title=\"struct iroh::endpoint::DirectAddr\">DirectAddr</a>"]]],["iroh_base",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html\" title=\"trait core::cmp::Ord\">Ord</a> for <a class=\"struct\" href=\"iroh_base/struct.NodeAddr.html\" title=\"struct iroh_base::NodeAddr\">NodeAddr</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html\" title=\"trait core::cmp::Ord\">Ord</a> for <a class=\"struct\" href=\"iroh_base/struct.PublicKey.html\" title=\"struct iroh_base::PublicKey\">PublicKey</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html\" title=\"trait core::cmp::Ord\">Ord</a> for <a class=\"struct\" href=\"iroh_base/struct.RelayUrl.html\" title=\"struct iroh_base::RelayUrl\">RelayUrl</a>"]]],["iroh_net_report",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html\" title=\"trait core::cmp::Ord\">Ord</a> for <a class=\"struct\" href=\"iroh_net_report/struct.IpMappedAddr.html\" title=\"struct iroh_net_report::IpMappedAddr\">IpMappedAddr</a>"]]],["iroh_relay",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html\" title=\"trait core::cmp::Ord\">Ord</a> for <a class=\"struct\" href=\"iroh_relay/node_info/struct.UserData.html\" title=\"struct iroh_relay::node_info::UserData\">UserData</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html\" title=\"trait core::cmp::Ord\">Ord</a> for <a class=\"struct\" href=\"iroh_relay/struct.RelayNode.html\" title=\"struct iroh_relay::RelayNode\">RelayNode</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html\" title=\"trait core::cmp::Ord\">Ord</a> for <a class=\"struct\" href=\"iroh_relay/struct.RelayQuicConfig.html\" title=\"struct iroh_relay::RelayQuicConfig\">RelayQuicConfig</a>"]]]]);
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()
//{"start":57,"fragment_lengths":[542,763,294,541]}
//{"start":57,"fragment_lengths":[542,763,294,812]}
File diff suppressed because one or more lines are too long
@@ -1,9 +1,9 @@
(function() {
var implementors = Object.fromEntries([["iroh",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a> for <a class=\"enum\" href=\"iroh/endpoint/enum.DirectAddrType.html\" title=\"enum iroh::endpoint::DirectAddrType\">DirectAddrType</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a> for <a class=\"struct\" href=\"iroh/endpoint/struct.DirectAddr.html\" title=\"struct iroh::endpoint::DirectAddr\">DirectAddr</a>"]]],["iroh_base",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a> for <a class=\"struct\" href=\"iroh_base/struct.NodeAddr.html\" title=\"struct iroh_base::NodeAddr\">NodeAddr</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a> for <a class=\"struct\" href=\"iroh_base/struct.PublicKey.html\" title=\"struct iroh_base::PublicKey\">PublicKey</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a> for <a class=\"struct\" href=\"iroh_base/struct.RelayUrl.html\" title=\"struct iroh_base::RelayUrl\">RelayUrl</a>"]]],["iroh_net_report",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a> for <a class=\"struct\" href=\"iroh_net_report/struct.IpMappedAddr.html\" title=\"struct iroh_net_report::IpMappedAddr\">IpMappedAddr</a>"]]],["iroh_relay",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a> for <a class=\"struct\" href=\"iroh_relay/struct.RelayNode.html\" title=\"struct iroh_relay::RelayNode\">RelayNode</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a> for <a class=\"struct\" href=\"iroh_relay/struct.RelayQuicConfig.html\" title=\"struct iroh_relay::RelayQuicConfig\">RelayQuicConfig</a>"]]]]);
var implementors = Object.fromEntries([["iroh",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a> for <a class=\"enum\" href=\"iroh/endpoint/enum.DirectAddrType.html\" title=\"enum iroh::endpoint::DirectAddrType\">DirectAddrType</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a> for <a class=\"struct\" href=\"iroh/endpoint/struct.DirectAddr.html\" title=\"struct iroh::endpoint::DirectAddr\">DirectAddr</a>"]]],["iroh_base",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a> for <a class=\"struct\" href=\"iroh_base/struct.NodeAddr.html\" title=\"struct iroh_base::NodeAddr\">NodeAddr</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a> for <a class=\"struct\" href=\"iroh_base/struct.PublicKey.html\" title=\"struct iroh_base::PublicKey\">PublicKey</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a> for <a class=\"struct\" href=\"iroh_base/struct.RelayUrl.html\" title=\"struct iroh_base::RelayUrl\">RelayUrl</a>"]]],["iroh_net_report",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a> for <a class=\"struct\" href=\"iroh_net_report/struct.IpMappedAddr.html\" title=\"struct iroh_net_report::IpMappedAddr\">IpMappedAddr</a>"]]],["iroh_relay",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a> for <a class=\"struct\" href=\"iroh_relay/node_info/struct.UserData.html\" title=\"struct iroh_relay::node_info::UserData\">UserData</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a> for <a class=\"struct\" href=\"iroh_relay/struct.RelayNode.html\" title=\"struct iroh_relay::RelayNode\">RelayNode</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a> for <a class=\"struct\" href=\"iroh_relay/struct.RelayQuicConfig.html\" title=\"struct iroh_relay::RelayQuicConfig\">RelayQuicConfig</a>"]]]]);
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()
//{"start":57,"fragment_lengths":[584,826,315,583]}
//{"start":57,"fragment_lengths":[584,826,315,875]}
@@ -1,9 +1,9 @@
(function() {
var implementors = Object.fromEntries([["iroh_base",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html\" title=\"trait core::convert::AsRef\">AsRef</a>&lt;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]&gt; for <a class=\"struct\" href=\"iroh_base/struct.PublicKey.html\" title=\"struct iroh_base::PublicKey\">PublicKey</a>"]]]]);
var implementors = Object.fromEntries([["iroh_base",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html\" title=\"trait core::convert::AsRef\">AsRef</a>&lt;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]&gt; for <a class=\"struct\" href=\"iroh_base/struct.PublicKey.html\" title=\"struct iroh_base::PublicKey\">PublicKey</a>"]]],["iroh_relay",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html\" title=\"trait core::convert::AsRef\">AsRef</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.str.html\">str</a>&gt; for <a class=\"struct\" href=\"iroh_relay/node_info/struct.UserData.html\" title=\"struct iroh_relay::node_info::UserData\">UserData</a>"]]]]);
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()
//{"start":57,"fragment_lengths":[384]}
//{"start":57,"fragment_lengths":[384,406]}
@@ -1,9 +1,9 @@
(function() {
var implementors = Object.fromEntries([["iroh_base",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;&amp;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>; <a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.array.html\">32</a>]&gt; for <a class=\"struct\" href=\"iroh_base/struct.PublicKey.html\" title=\"struct iroh_base::PublicKey\">PublicKey</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;&amp;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]&gt; for <a class=\"struct\" href=\"iroh_base/struct.PublicKey.html\" title=\"struct iroh_base::PublicKey\">PublicKey</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;&amp;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]&gt; for <a class=\"struct\" href=\"iroh_base/struct.SecretKey.html\" title=\"struct iroh_base::SecretKey\">SecretKey</a>"]]],["iroh_net_report",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/core/net/ip_addr/struct.Ipv6Addr.html\" title=\"struct core::net::ip_addr::Ipv6Addr\">Ipv6Addr</a>&gt; for <a class=\"struct\" href=\"iroh_net_report/struct.IpMappedAddr.html\" title=\"struct iroh_net_report::IpMappedAddr\">IpMappedAddr</a>"]]]]);
var implementors = Object.fromEntries([["iroh_base",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;&amp;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>; <a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.array.html\">32</a>]&gt; for <a class=\"struct\" href=\"iroh_base/struct.PublicKey.html\" title=\"struct iroh_base::PublicKey\">PublicKey</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;&amp;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]&gt; for <a class=\"struct\" href=\"iroh_base/struct.PublicKey.html\" title=\"struct iroh_base::PublicKey\">PublicKey</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;&amp;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]&gt; for <a class=\"struct\" href=\"iroh_base/struct.SecretKey.html\" title=\"struct iroh_base::SecretKey\">SecretKey</a>"]]],["iroh_net_report",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/core/net/ip_addr/struct.Ipv6Addr.html\" title=\"struct core::net::ip_addr::Ipv6Addr\">Ipv6Addr</a>&gt; for <a class=\"struct\" href=\"iroh_net_report/struct.IpMappedAddr.html\" title=\"struct iroh_net_report::IpMappedAddr\">IpMappedAddr</a>"]]],["iroh_relay",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/alloc/string/struct.String.html\" title=\"struct alloc::string::String\">String</a>&gt; for <a class=\"struct\" href=\"iroh_relay/node_info/struct.UserData.html\" title=\"struct iroh_relay::node_info::UserData\">UserData</a>"]]]]);
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()
//{"start":57,"fragment_lengths":[1254,481]}
//{"start":57,"fragment_lengths":[1254,481,460]}
@@ -1,9 +1,9 @@
(function() {
var implementors = Object.fromEntries([["iroh",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/error/trait.Error.html\" title=\"trait core::error::Error\">Error</a> for <a class=\"struct\" href=\"iroh/discovery/struct.Lagged.html\" title=\"struct iroh::discovery::Lagged\">Lagged</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/error/trait.Error.html\" title=\"trait core::error::Error\">Error</a> for <a class=\"struct\" href=\"iroh/watchable/struct.Disconnected.html\" title=\"struct iroh::watchable::Disconnected\">Disconnected</a>"]]],["iroh_base",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/error/trait.Error.html\" title=\"trait core::error::Error\">Error</a> for <a class=\"enum\" href=\"iroh_base/enum.KeyParsingError.html\" title=\"enum iroh_base::KeyParsingError\">KeyParsingError</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/error/trait.Error.html\" title=\"trait core::error::Error\">Error</a> for <a class=\"enum\" href=\"iroh_base/ticket/enum.Error.html\" title=\"enum iroh_base::ticket::Error\">Error</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/error/trait.Error.html\" title=\"trait core::error::Error\">Error</a> for <a class=\"struct\" href=\"iroh_base/struct.RelayUrlParseError.html\" title=\"struct iroh_base::RelayUrlParseError\">RelayUrlParseError</a>"]]],["iroh_net_report",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/error/trait.Error.html\" title=\"trait core::error::Error\">Error</a> for <a class=\"struct\" href=\"iroh_net_report/struct.IpMappedAddrError.html\" title=\"struct iroh_net_report::IpMappedAddrError\">IpMappedAddrError</a>"]]],["iroh_relay",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/error/trait.Error.html\" title=\"trait core::error::Error\">Error</a> for <a class=\"enum\" href=\"iroh_relay/client/enum.ConnSendError.html\" title=\"enum iroh_relay::client::ConnSendError\">ConnSendError</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/error/trait.Error.html\" title=\"trait core::error::Error\">Error</a> for <a class=\"enum\" href=\"iroh_relay/protos/stun/enum.Error.html\" title=\"enum iroh_relay::protos::stun::Error\">Error</a>"]]]]);
var implementors = Object.fromEntries([["iroh",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/error/trait.Error.html\" title=\"trait core::error::Error\">Error</a> for <a class=\"struct\" href=\"iroh/discovery/struct.Lagged.html\" title=\"struct iroh::discovery::Lagged\">Lagged</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/error/trait.Error.html\" title=\"trait core::error::Error\">Error</a> for <a class=\"struct\" href=\"iroh/watchable/struct.Disconnected.html\" title=\"struct iroh::watchable::Disconnected\">Disconnected</a>"]]],["iroh_base",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/error/trait.Error.html\" title=\"trait core::error::Error\">Error</a> for <a class=\"enum\" href=\"iroh_base/enum.KeyParsingError.html\" title=\"enum iroh_base::KeyParsingError\">KeyParsingError</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/error/trait.Error.html\" title=\"trait core::error::Error\">Error</a> for <a class=\"enum\" href=\"iroh_base/ticket/enum.Error.html\" title=\"enum iroh_base::ticket::Error\">Error</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/error/trait.Error.html\" title=\"trait core::error::Error\">Error</a> for <a class=\"struct\" href=\"iroh_base/struct.RelayUrlParseError.html\" title=\"struct iroh_base::RelayUrlParseError\">RelayUrlParseError</a>"]]],["iroh_net_report",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/error/trait.Error.html\" title=\"trait core::error::Error\">Error</a> for <a class=\"struct\" href=\"iroh_net_report/struct.IpMappedAddrError.html\" title=\"struct iroh_net_report::IpMappedAddrError\">IpMappedAddrError</a>"]]],["iroh_relay",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/error/trait.Error.html\" title=\"trait core::error::Error\">Error</a> for <a class=\"enum\" href=\"iroh_relay/client/enum.ConnSendError.html\" title=\"enum iroh_relay::client::ConnSendError\">ConnSendError</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/error/trait.Error.html\" title=\"trait core::error::Error\">Error</a> for <a class=\"enum\" href=\"iroh_relay/protos/stun/enum.Error.html\" title=\"enum iroh_relay::protos::stun::Error\">Error</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/error/trait.Error.html\" title=\"trait core::error::Error\">Error</a> for <a class=\"struct\" href=\"iroh_relay/node_info/struct.MaxLengthExceededError.html\" title=\"struct iroh_relay::node_info::MaxLengthExceededError\">MaxLengthExceededError</a>"]]]]);
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()
//{"start":57,"fragment_lengths":[554,835,319,572]}
//{"start":57,"fragment_lengths":[554,835,319,895]}
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 @@
(function() {
var implementors = Object.fromEntries([["iroh",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html\" title=\"trait core::hash::Hash\">Hash</a> for <a class=\"enum\" href=\"iroh/endpoint/enum.DirectAddrType.html\" title=\"enum iroh::endpoint::DirectAddrType\">DirectAddrType</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html\" title=\"trait core::hash::Hash\">Hash</a> for <a class=\"enum\" href=\"iroh/endpoint/enum.Source.html\" title=\"enum iroh::endpoint::Source\">Source</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html\" title=\"trait core::hash::Hash\">Hash</a> for <a class=\"struct\" href=\"iroh/endpoint/struct.DirectAddr.html\" title=\"struct iroh::endpoint::DirectAddr\">DirectAddr</a>"]]],["iroh_base",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html\" title=\"trait core::hash::Hash\">Hash</a> for <a class=\"struct\" href=\"iroh_base/struct.PublicKey.html\" title=\"struct iroh_base::PublicKey\">PublicKey</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html\" title=\"trait core::hash::Hash\">Hash</a> for <a class=\"struct\" href=\"iroh_base/struct.RelayUrl.html\" title=\"struct iroh_base::RelayUrl\">RelayUrl</a>"]]],["iroh_net_report",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html\" title=\"trait core::hash::Hash\">Hash</a> for <a class=\"struct\" href=\"iroh_net_report/struct.IpMappedAddr.html\" title=\"struct iroh_net_report::IpMappedAddr\">IpMappedAddr</a>"]]]]);
var implementors = Object.fromEntries([["iroh",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html\" title=\"trait core::hash::Hash\">Hash</a> for <a class=\"enum\" href=\"iroh/endpoint/enum.DirectAddrType.html\" title=\"enum iroh::endpoint::DirectAddrType\">DirectAddrType</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html\" title=\"trait core::hash::Hash\">Hash</a> for <a class=\"enum\" href=\"iroh/endpoint/enum.Source.html\" title=\"enum iroh::endpoint::Source\">Source</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html\" title=\"trait core::hash::Hash\">Hash</a> for <a class=\"struct\" href=\"iroh/endpoint/struct.DirectAddr.html\" title=\"struct iroh::endpoint::DirectAddr\">DirectAddr</a>"]]],["iroh_base",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html\" title=\"trait core::hash::Hash\">Hash</a> for <a class=\"struct\" href=\"iroh_base/struct.PublicKey.html\" title=\"struct iroh_base::PublicKey\">PublicKey</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html\" title=\"trait core::hash::Hash\">Hash</a> for <a class=\"struct\" href=\"iroh_base/struct.RelayUrl.html\" title=\"struct iroh_base::RelayUrl\">RelayUrl</a>"]]],["iroh_net_report",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html\" title=\"trait core::hash::Hash\">Hash</a> for <a class=\"struct\" href=\"iroh_net_report/struct.IpMappedAddr.html\" title=\"struct iroh_net_report::IpMappedAddr\">IpMappedAddr</a>"]]],["iroh_relay",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html\" title=\"trait core::hash::Hash\">Hash</a> for <a class=\"struct\" href=\"iroh_relay/node_info/struct.UserData.html\" title=\"struct iroh_relay::node_info::UserData\">UserData</a>"]]]]);
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()
//{"start":57,"fragment_lengths":[802,525,299]}
//{"start":57,"fragment_lengths":[802,525,299,293]}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,9 +1,9 @@
(function() {
var implementors = Object.fromEntries([["iroh_base",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/str/traits/trait.FromStr.html\" title=\"trait core::str::traits::FromStr\">FromStr</a> for <a class=\"struct\" href=\"iroh_base/struct.PublicKey.html\" title=\"struct iroh_base::PublicKey\">PublicKey</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/str/traits/trait.FromStr.html\" title=\"trait core::str::traits::FromStr\">FromStr</a> for <a class=\"struct\" href=\"iroh_base/struct.RelayUrl.html\" title=\"struct iroh_base::RelayUrl\">RelayUrl</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/str/traits/trait.FromStr.html\" title=\"trait core::str::traits::FromStr\">FromStr</a> for <a class=\"struct\" href=\"iroh_base/struct.SecretKey.html\" title=\"struct iroh_base::SecretKey\">SecretKey</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/str/traits/trait.FromStr.html\" title=\"trait core::str::traits::FromStr\">FromStr</a> for <a class=\"struct\" href=\"iroh_base/ticket/struct.NodeTicket.html\" title=\"struct iroh_base::ticket::NodeTicket\">NodeTicket</a>"]]]]);
var implementors = Object.fromEntries([["iroh_base",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/str/traits/trait.FromStr.html\" title=\"trait core::str::traits::FromStr\">FromStr</a> for <a class=\"struct\" href=\"iroh_base/struct.PublicKey.html\" title=\"struct iroh_base::PublicKey\">PublicKey</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/str/traits/trait.FromStr.html\" title=\"trait core::str::traits::FromStr\">FromStr</a> for <a class=\"struct\" href=\"iroh_base/struct.RelayUrl.html\" title=\"struct iroh_base::RelayUrl\">RelayUrl</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/str/traits/trait.FromStr.html\" title=\"trait core::str::traits::FromStr\">FromStr</a> for <a class=\"struct\" href=\"iroh_base/struct.SecretKey.html\" title=\"struct iroh_base::SecretKey\">SecretKey</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/str/traits/trait.FromStr.html\" title=\"trait core::str::traits::FromStr\">FromStr</a> for <a class=\"struct\" href=\"iroh_base/ticket/struct.NodeTicket.html\" title=\"struct iroh_base::ticket::NodeTicket\">NodeTicket</a>"]]],["iroh_relay",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/str/traits/trait.FromStr.html\" title=\"trait core::str::traits::FromStr\">FromStr</a> for <a class=\"struct\" href=\"iroh_relay/node_info/struct.UserData.html\" title=\"struct iroh_relay::node_info::UserData\">UserData</a>"]]]]);
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()
//{"start":57,"fragment_lengths":[1142]}
//{"start":57,"fragment_lengths":[1142,315]}