mirror of
https://github.com/n0-computer/iroh.git
synced 2026-11-30 16:03:05 +00:00
deploy: 3671e685482f47dcaa5692d1150195d232f9aec3
This commit is contained in:
@@ -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 default QUIC port used by the Relay server to accept QUIC connections for QUIC address discovery"><title>DEFAULT_RELAY_QUIC_PORT in iroh::defaults - 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>defaults</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">defaults</a></span><h1>Constant <span class="constant">DEFAULT_RELAY_QUIC_PORT</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><pre class="rust item-decl"><code>pub const DEFAULT_RELAY_QUIC_PORT: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a> = 7842; // 7_842u16</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The default QUIC port used by the Relay server to accept QUIC connections
|
||||
<!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 default QUIC port used by the Relay server to accept QUIC connections for QUIC address discovery"><title>DEFAULT_RELAY_QUIC_PORT in iroh::defaults - 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>defaults</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">defaults</a></span><h1>Constant <span class="constant">DEFAULT_RELAY_QUIC_PORT</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/defaults.rs.html#12">Source</a> </span></div><pre class="rust item-decl"><code>pub const DEFAULT_RELAY_QUIC_PORT: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a> = 7842; // 7_842u16</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The default QUIC port used by the Relay server to accept QUIC connections
|
||||
for QUIC address discovery</p>
|
||||
<p>The port is “QUIC” typed on a phone keypad.
|
||||
The default QUIC port used by the Relay server to accept QUIC connections
|
||||
|
||||
@@ -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 default STUN port used by the Relay server."><title>DEFAULT_STUN_PORT in iroh::defaults - 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>defaults</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">defaults</a></span><h1>Constant <span class="constant">DEFAULT_STUN_PORT</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><pre class="rust item-decl"><code>pub const DEFAULT_STUN_PORT: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a> = 3478; // 3_478u16</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The default STUN port used by the Relay server.</p>
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="The default STUN port used by the Relay server."><title>DEFAULT_STUN_PORT in iroh::defaults - 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>defaults</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">defaults</a></span><h1>Constant <span class="constant">DEFAULT_STUN_PORT</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/defaults.rs.html#6">Source</a> </span></div><pre class="rust item-decl"><code>pub const DEFAULT_STUN_PORT: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a> = 3478; // 3_478u16</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The default STUN port used by the Relay server.</p>
|
||||
<p>The STUN port as defined by <a href="https://www.rfc-editor.org/rfc/rfc8489#section-18.6">RFC
|
||||
8489</a>
|
||||
The default STUN port used by the Relay server.</p>
|
||||
|
||||
@@ -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="The n0 testing DNS node origin, for production."><title>N0_DNS_NODE_ORIGIN_PROD in iroh::discovery::dns - 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>discovery::<wbr>dns</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>::<wbr><a href="index.html">dns</a></span><h1>Constant <span class="constant">N0_DNS_NODE_ORIGIN_PROD</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><pre class="rust item-decl"><code>pub const N0_DNS_NODE_ORIGIN_PROD: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The n0 testing DNS node origin, for production.</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 n0 testing DNS node origin, for production."><title>N0_DNS_NODE_ORIGIN_PROD in iroh::discovery::dns - 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>discovery::<wbr>dns</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>::<wbr><a href="index.html">dns</a></span><h1>Constant <span class="constant">N0_DNS_NODE_ORIGIN_PROD</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/dns.rs.html#22">Source</a> </span></div><pre class="rust item-decl"><code>pub const N0_DNS_NODE_ORIGIN_PROD: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The n0 testing DNS node origin, for production.</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="The n0 testing DNS node origin, for testing."><title>N0_DNS_NODE_ORIGIN_STAGING in iroh::discovery::dns - 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>discovery::<wbr>dns</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>::<wbr><a href="index.html">dns</a></span><h1>Constant <span class="constant">N0_DNS_NODE_ORIGIN_STAGING</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><pre class="rust item-decl"><code>pub const N0_DNS_NODE_ORIGIN_STAGING: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The n0 testing DNS node origin, for testing.</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 n0 testing DNS node origin, for testing."><title>N0_DNS_NODE_ORIGIN_STAGING in iroh::discovery::dns - 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>discovery::<wbr>dns</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>::<wbr><a href="index.html">dns</a></span><h1>Constant <span class="constant">N0_DNS_NODE_ORIGIN_STAGING</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/dns.rs.html#24">Source</a> </span></div><pre class="rust item-decl"><code>pub const N0_DNS_NODE_ORIGIN_STAGING: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The n0 testing DNS node origin, for testing.</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="DNS node discovery for iroh"><title>iroh::discovery::dns - 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 dns</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>dns</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/dns.rs.html#1-82">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>DNS node discovery for iroh</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="DNS node discovery for iroh"><title>iroh::discovery::dns - 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 dns</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>dns</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/dns.rs.html#1-78">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>DNS node discovery for iroh</p>
|
||||
</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.DnsDiscovery.html" title="struct iroh::discovery::dns::DnsDiscovery">DnsDiscovery</a></div><div class="desc docblock-short">DNS node discovery</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.N0_DNS_NODE_ORIGIN_PROD.html" title="constant iroh::discovery::dns::N0_DNS_NODE_ORIGIN_PROD">N0_<wbr>DNS_<wbr>NODE_<wbr>ORIGIN_<wbr>PROD</a></div><div class="desc docblock-short">The n0 testing DNS node origin, for production.</div></li><li><div class="item-name"><a class="constant" href="constant.N0_DNS_NODE_ORIGIN_STAGING.html" title="constant iroh::discovery::dns::N0_DNS_NODE_ORIGIN_STAGING">N0_<wbr>DNS_<wbr>NODE_<wbr>ORIGIN_<wbr>STAGING</a></div><div class="desc docblock-short">The n0 testing DNS node origin, for testing.</div></li></ul></section></div></main></body></html>
|
||||
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="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-912">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-940">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></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">The results returned from <a href="trait.Discovery.html#method.resolve" title="method iroh::discovery::Discovery::resolve"><code>Discovery::resolve</code></a>.</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">The information that can be published about a node in 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 the iroh node contained in an <a href="../dns/node_info/constant.IROH_TXT_NAME.html" title="constant iroh::dns::node_info::IROH_TXT_NAME"><code>IROH_TXT_NAME</code></a> TXT resource 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.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></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">The results returned from <a href="trait.Discovery.html#method.resolve" title="method iroh::discovery::Discovery::resolve"><code>Discovery::resolve</code></a>.</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>
|
||||
@@ -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-498">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-478">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,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="Pkarr based node discovery for iroh, supporting both relay servers and the DHT."><title>iroh::discovery::pkarr::dht - 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 dht</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::<wbr>pkarr</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>::<wbr><a href="../index.html">pkarr</a></span><h1>Module <span>dht</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/pkarr/dht.rs.html#1-455">Source</a> </span></div><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>discovery-pkarr-dht</code></strong> only.</div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Pkarr based node discovery for iroh, supporting both relay servers and the DHT.</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="Pkarr based node discovery for iroh, supporting both relay servers and the DHT."><title>iroh::discovery::pkarr::dht - 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 dht</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::<wbr>pkarr</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>::<wbr><a href="../index.html">pkarr</a></span><h1>Module <span>dht</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/pkarr/dht.rs.html#1-447">Source</a> </span></div><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>discovery-pkarr-dht</code></strong> only.</div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Pkarr based node discovery for iroh, supporting both relay servers and the DHT.</p>
|
||||
<p>This module contains pkarr-based node discovery for iroh which can use both pkarr
|
||||
relay servers as well as the Mainline DHT directly. See the <a href="../index.html" title="mod iroh::discovery::pkarr">pkarr module</a> for an
|
||||
overview of pkarr.</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
@@ -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-259">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-257">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
@@ -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 discovery for `super::Endpoint`."><title>Discovery in 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 trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh/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="#">Discovery</a></h2><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.publish" title="publish">publish</a></li><li><a href="#method.resolve" title="resolve">resolve</a></li><li><a href="#method.subscribe" title="subscribe">subscribe</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-Discovery-for-Arc%3CT%3E" title="Arc<T>">Arc<T></a></li></ul><h3><a href="#implementors">Implementors</a></h3></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>Trait <span class="trait">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#145-192">Source</a> </span></div><pre class="rust item-decl"><code>pub trait Discovery:
|
||||
<!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 discovery for `super::Endpoint`."><title>Discovery in 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 trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh/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="#">Discovery</a></h2><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.publish" title="publish">publish</a></li><li><a href="#method.resolve" title="resolve">resolve</a></li><li><a href="#method.subscribe" title="subscribe">subscribe</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-Discovery-for-Arc%3CT%3E" title="Arc<T>">Arc<T></a></li></ul><h3><a href="#implementors">Implementors</a></h3></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>Trait <span class="trait">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#146-193">Source</a> </span></div><pre class="rust item-decl"><code>pub trait Discovery:
|
||||
<a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>
|
||||
+ <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>
|
||||
+ <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> {
|
||||
@@ -21,19 +21,19 @@ addresses. See <a href="../dns/node_info/struct.NodeData.html" title="struct iro
|
||||
<p>To allow for discovery, the <a href="../endpoint/struct.Endpoint.html" title="struct iroh::endpoint::Endpoint"><code>super::Endpoint</code></a> will call <code>publish</code> whenever
|
||||
discovery information changes. If a discovery mechanism requires a periodic
|
||||
refresh, it should start its own task.</p>
|
||||
</div></details><h2 id="provided-methods" class="section-header">Provided Methods<a href="#provided-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="method.publish" class="method"><a class="src rightside" href="../../src/iroh/discovery.rs.html#153">Source</a><h4 class="code-header">fn <a href="#method.publish" class="fn">publish</a>(&self, _data: &<a class="struct" href="../dns/node_info/struct.NodeData.html" title="struct iroh::dns::node_info::NodeData">NodeData</a>)</h4></section></summary><div class="docblock"><p>Publishes the given <a href="../dns/node_info/struct.NodeData.html" title="struct iroh::dns::node_info::NodeData"><code>NodeData</code></a> to the discovery mechanism.</p>
|
||||
</div></details><h2 id="provided-methods" class="section-header">Provided Methods<a href="#provided-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="method.publish" class="method"><a class="src rightside" href="../../src/iroh/discovery.rs.html#154">Source</a><h4 class="code-header">fn <a href="#method.publish" class="fn">publish</a>(&self, _data: &<a class="struct" href="../dns/node_info/struct.NodeData.html" title="struct iroh::dns::node_info::NodeData">NodeData</a>)</h4></section></summary><div class="docblock"><p>Publishes the given <a href="../dns/node_info/struct.NodeData.html" title="struct iroh::dns::node_info::NodeData"><code>NodeData</code></a> to the discovery mechanism.</p>
|
||||
<p>This is fire and forget, since the <a href="../endpoint/struct.Endpoint.html" title="struct iroh::endpoint::Endpoint"><code>Endpoint</code></a> can not wait for successful
|
||||
publishing. If publishing is async, the implementation should start it’s own task.</p>
|
||||
<p>This will be called from a tokio task, so it is safe to spawn new tasks.
|
||||
These tasks will be run on the runtime of the <a href="../endpoint/struct.Endpoint.html" title="struct iroh::endpoint::Endpoint"><code>super::Endpoint</code></a>.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.resolve" class="method"><a class="src rightside" href="../../src/iroh/discovery.rs.html#159-165">Source</a><h4 class="code-header">fn <a href="#method.resolve" class="fn">resolve</a>(
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.resolve" class="method"><a class="src rightside" href="../../src/iroh/discovery.rs.html#160-166">Source</a><h4 class="code-header">fn <a href="#method.resolve" class="fn">resolve</a>(
|
||||
&self,
|
||||
_endpoint: <a class="struct" href="../endpoint/struct.Endpoint.html" title="struct iroh::endpoint::Endpoint">Endpoint</a>,
|
||||
_node_id: <a class="type" href="../type.NodeId.html" title="type iroh::NodeId">NodeId</a>,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><BoxStream<<a class="type" href="https://docs.rs/anyhow/1.0.95/anyhow/type.Result.html" title="type anyhow::Result">Result</a><<a class="struct" href="struct.DiscoveryItem.html" title="struct iroh::discovery::DiscoveryItem">DiscoveryItem</a>>>></h4></section></summary><div class="docblock"><p>Resolves the <a href="struct.DiscoveryItem.html" title="struct iroh::discovery::DiscoveryItem"><code>DiscoveryItem</code></a> for the given <a href="../type.NodeId.html" title="type iroh::NodeId"><code>NodeId</code></a>.</p>
|
||||
<p>Once the returned [<code>BoxStream</code>] is dropped, the service should stop any pending
|
||||
work.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.subscribe" class="method"><a class="src rightside" href="../../src/iroh/discovery.rs.html#189-191">Source</a><h4 class="code-header">fn <a href="#method.subscribe" class="fn">subscribe</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><BoxStream<<a class="struct" href="struct.DiscoveryItem.html" title="struct iroh::discovery::DiscoveryItem">DiscoveryItem</a>>></h4></section></summary><div class="docblock"><p>Subscribe to all addresses that get <em>passively</em> discovered.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.subscribe" class="method"><a class="src rightside" href="../../src/iroh/discovery.rs.html#190-192">Source</a><h4 class="code-header">fn <a href="#method.subscribe" class="fn">subscribe</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><BoxStream<<a class="struct" href="struct.DiscoveryItem.html" title="struct iroh::discovery::DiscoveryItem">DiscoveryItem</a>>></h4></section></summary><div class="docblock"><p>Subscribe to all addresses that get <em>passively</em> discovered.</p>
|
||||
<p>An implementation may choose to defer emitting passively discovered nodes
|
||||
until the stream is actually polled. To avoid missing discovered nodes,
|
||||
poll the stream as soon as possible.</p>
|
||||
@@ -50,4 +50,4 @@ should be sent on all streams.</p>
|
||||
<p>The <a href="../endpoint/struct.Endpoint.html" title="struct iroh::endpoint::Endpoint"><code>crate::endpoint::Endpoint</code></a> will <code>subscribe</code> to the discovery system
|
||||
and add the discovered addresses to the internal address book as they arrive
|
||||
on this stream.</p>
|
||||
</div></details></div><h2 id="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><section id="impl-Discovery-for-Arc%3CT%3E" class="impl"><a class="src rightside" href="../../src/iroh/discovery.rs.html#194">Source</a><a href="#impl-Discovery-for-Arc%3CT%3E" class="anchor">§</a><h3 class="code-header">impl<T: <a class="trait" href="trait.Discovery.html" title="trait iroh::discovery::Discovery">Discovery</a>> <a class="trait" href="trait.Discovery.html" title="trait iroh::discovery::Discovery">Discovery</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a><T></h3></section><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><section id="impl-Discovery-for-DnsDiscovery" class="impl"><a class="src rightside" href="../../src/iroh/discovery/dns.rs.html#65-82">Source</a><a href="#impl-Discovery-for-DnsDiscovery" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Discovery.html" title="trait iroh::discovery::Discovery">Discovery</a> for <a class="struct" href="dns/struct.DnsDiscovery.html" title="struct iroh::discovery::dns::DnsDiscovery">DnsDiscovery</a></h3></section><section id="impl-Discovery-for-LocalSwarmDiscovery" class="impl"><a class="src rightside" href="../../src/iroh/discovery/local_swarm_discovery.rs.html#363-399">Source</a><a href="#impl-Discovery-for-LocalSwarmDiscovery" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Discovery.html" title="trait iroh::discovery::Discovery">Discovery</a> for <a class="struct" href="local_swarm_discovery/struct.LocalSwarmDiscovery.html" title="struct iroh::discovery::local_swarm_discovery::LocalSwarmDiscovery">LocalSwarmDiscovery</a></h3><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>discovery-local-network</code></strong> only.</div></span></section><section id="impl-Discovery-for-DhtDiscovery" class="impl"><a class="src rightside" href="../../src/iroh/discovery/pkarr/dht.rs.html#347-393">Source</a><a href="#impl-Discovery-for-DhtDiscovery" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Discovery.html" title="trait iroh::discovery::Discovery">Discovery</a> for <a class="struct" href="pkarr/dht/struct.DhtDiscovery.html" title="struct iroh::discovery::pkarr::dht::DhtDiscovery">DhtDiscovery</a></h3><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>discovery-pkarr-dht</code></strong> only.</div></span></section><section id="impl-Discovery-for-PkarrPublisher" class="impl"><a class="src rightside" href="../../src/iroh/discovery/pkarr.rs.html#207-211">Source</a><a href="#impl-Discovery-for-PkarrPublisher" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Discovery.html" title="trait iroh::discovery::Discovery">Discovery</a> for <a class="struct" href="pkarr/struct.PkarrPublisher.html" title="struct iroh::discovery::pkarr::PkarrPublisher">PkarrPublisher</a></h3></section><section id="impl-Discovery-for-PkarrResolver" class="impl"><a class="src rightside" href="../../src/iroh/discovery/pkarr.rs.html#324-336">Source</a><a href="#impl-Discovery-for-PkarrResolver" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Discovery.html" title="trait iroh::discovery::Discovery">Discovery</a> for <a class="struct" href="pkarr/struct.PkarrResolver.html" title="struct iroh::discovery::pkarr::PkarrResolver">PkarrResolver</a></h3></section><section id="impl-Discovery-for-StaticProvider" class="impl"><a class="src rightside" href="../../src/iroh/discovery/static_provider.rs.html#187-215">Source</a><a href="#impl-Discovery-for-StaticProvider" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Discovery.html" title="trait iroh::discovery::Discovery">Discovery</a> for <a class="struct" href="static_provider/struct.StaticProvider.html" title="struct iroh::discovery::static_provider::StaticProvider">StaticProvider</a></h3></section><section id="impl-Discovery-for-ConcurrentDiscovery" class="impl"><a class="src rightside" href="../../src/iroh/discovery.rs.html#278-310">Source</a><a href="#impl-Discovery-for-ConcurrentDiscovery" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Discovery.html" title="trait iroh::discovery::Discovery">Discovery</a> for <a class="struct" href="struct.ConcurrentDiscovery.html" title="struct iroh::discovery::ConcurrentDiscovery">ConcurrentDiscovery</a></h3></section></div><script src="../../trait.impl/iroh/discovery/trait.Discovery.js" data-ignore-extern-crates="alloc" async></script></section></div></main></body></html>
|
||||
</div></details></div><h2 id="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><section id="impl-Discovery-for-Arc%3CT%3E" class="impl"><a class="src rightside" href="../../src/iroh/discovery.rs.html#195">Source</a><a href="#impl-Discovery-for-Arc%3CT%3E" class="anchor">§</a><h3 class="code-header">impl<T: <a class="trait" href="trait.Discovery.html" title="trait iroh::discovery::Discovery">Discovery</a>> <a class="trait" href="trait.Discovery.html" title="trait iroh::discovery::Discovery">Discovery</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a><T></h3></section><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><section id="impl-Discovery-for-DnsDiscovery" class="impl"><a class="src rightside" href="../../src/iroh/discovery/dns.rs.html#65-78">Source</a><a href="#impl-Discovery-for-DnsDiscovery" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Discovery.html" title="trait iroh::discovery::Discovery">Discovery</a> for <a class="struct" href="dns/struct.DnsDiscovery.html" title="struct iroh::discovery::dns::DnsDiscovery">DnsDiscovery</a></h3></section><section id="impl-Discovery-for-LocalSwarmDiscovery" class="impl"><a class="src rightside" href="../../src/iroh/discovery/local_swarm_discovery.rs.html#356-387">Source</a><a href="#impl-Discovery-for-LocalSwarmDiscovery" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Discovery.html" title="trait iroh::discovery::Discovery">Discovery</a> for <a class="struct" href="local_swarm_discovery/struct.LocalSwarmDiscovery.html" title="struct iroh::discovery::local_swarm_discovery::LocalSwarmDiscovery">LocalSwarmDiscovery</a></h3><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>discovery-local-network</code></strong> only.</div></span></section><section id="impl-Discovery-for-DhtDiscovery" class="impl"><a class="src rightside" href="../../src/iroh/discovery/pkarr/dht.rs.html#339-385">Source</a><a href="#impl-Discovery-for-DhtDiscovery" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Discovery.html" title="trait iroh::discovery::Discovery">Discovery</a> for <a class="struct" href="pkarr/dht/struct.DhtDiscovery.html" title="struct iroh::discovery::pkarr::dht::DhtDiscovery">DhtDiscovery</a></h3><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>discovery-pkarr-dht</code></strong> only.</div></span></section><section id="impl-Discovery-for-PkarrPublisher" class="impl"><a class="src rightside" href="../../src/iroh/discovery/pkarr.rs.html#207-211">Source</a><a href="#impl-Discovery-for-PkarrPublisher" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Discovery.html" title="trait iroh::discovery::Discovery">Discovery</a> for <a class="struct" href="pkarr/struct.PkarrPublisher.html" title="struct iroh::discovery::pkarr::PkarrPublisher">PkarrPublisher</a></h3></section><section id="impl-Discovery-for-PkarrResolver" class="impl"><a class="src rightside" href="../../src/iroh/discovery/pkarr.rs.html#324-336">Source</a><a href="#impl-Discovery-for-PkarrResolver" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Discovery.html" title="trait iroh::discovery::Discovery">Discovery</a> for <a class="struct" href="pkarr/struct.PkarrResolver.html" title="struct iroh::discovery::pkarr::PkarrResolver">PkarrResolver</a></h3></section><section id="impl-Discovery-for-StaticProvider" class="impl"><a class="src rightside" href="../../src/iroh/discovery/static_provider.rs.html#186-213">Source</a><a href="#impl-Discovery-for-StaticProvider" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Discovery.html" title="trait iroh::discovery::Discovery">Discovery</a> for <a class="struct" href="static_provider/struct.StaticProvider.html" title="struct iroh::discovery::static_provider::StaticProvider">StaticProvider</a></h3></section><section id="impl-Discovery-for-ConcurrentDiscovery" class="impl"><a class="src rightside" href="../../src/iroh/discovery.rs.html#303-335">Source</a><a href="#impl-Discovery-for-ConcurrentDiscovery" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Discovery.html" title="trait iroh::discovery::Discovery">Discovery</a> for <a class="struct" href="struct.ConcurrentDiscovery.html" title="struct iroh::discovery::ConcurrentDiscovery">ConcurrentDiscovery</a></h3></section></div><script src="../../trait.impl/iroh/discovery/trait.Discovery.js" data-ignore-extern-crates="alloc" async></script></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="The n0 testing DNS node origin, for production."><title>N0_DNS_NODE_ORIGIN_PROD in iroh::dns - 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>dns</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">dns</a></span><h1>Constant <span class="constant">N0_DNS_NODE_ORIGIN_PROD</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><pre class="rust item-decl"><code>pub const N0_DNS_NODE_ORIGIN_PROD: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The n0 testing DNS node origin, for production.</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 n0 testing DNS node origin, for production."><title>N0_DNS_NODE_ORIGIN_PROD in iroh::dns - 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>dns</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">dns</a></span><h1>Constant <span class="constant">N0_DNS_NODE_ORIGIN_PROD</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/dns.rs.html#22">Source</a> </span></div><pre class="rust item-decl"><code>pub const N0_DNS_NODE_ORIGIN_PROD: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The n0 testing DNS node origin, for production.</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="The n0 testing DNS node origin, for testing."><title>N0_DNS_NODE_ORIGIN_STAGING in iroh::dns - 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>dns</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">dns</a></span><h1>Constant <span class="constant">N0_DNS_NODE_ORIGIN_STAGING</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><pre class="rust item-decl"><code>pub const N0_DNS_NODE_ORIGIN_STAGING: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The n0 testing DNS node origin, for testing.</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 n0 testing DNS node origin, for testing."><title>N0_DNS_NODE_ORIGIN_STAGING in iroh::dns - 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>dns</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">dns</a></span><h1>Constant <span class="constant">N0_DNS_NODE_ORIGIN_STAGING</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/dns.rs.html#24">Source</a> </span></div><pre class="rust item-decl"><code>pub const N0_DNS_NODE_ORIGIN_STAGING: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The n0 testing DNS node origin, for testing.</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="The DNS name for the iroh TXT record."><title>IROH_TXT_NAME in iroh::dns::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" 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>dns::<wbr>node_<wbr>info</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../../index.html">iroh</a>::<wbr><a href="../index.html">dns</a>::<wbr><a href="index.html">node_info</a></span><h1>Constant <span class="constant">IROH_TXT_NAME</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><pre class="rust item-decl"><code>pub const IROH_TXT_NAME: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The DNS name for the iroh TXT record.</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 DNS name for the iroh TXT record."><title>IROH_TXT_NAME in iroh::dns::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" 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>dns::<wbr>node_<wbr>info</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../../index.html">iroh</a>::<wbr><a href="../index.html">dns</a>::<wbr><a href="index.html">node_info</a></span><h1>Constant <span class="constant">IROH_TXT_NAME</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/dns/node_info.rs.html#52">Source</a> </span></div><pre class="rust item-decl"><code>pub const IROH_TXT_NAME: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The DNS name for the iroh TXT record.</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="Support for handling DNS resource records for dialing by `NodeId`."><title>iroh::dns::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" 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 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><a href="../index.html">In iroh::<wbr>dns</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">dns</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"></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="../../type.NodeId.html" title="type iroh::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::dns::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" 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 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><a href="../index.html">In iroh::<wbr>dns</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">dns</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/dns.rs.html#19">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="../../type.NodeId.html" title="type iroh::NodeId"><code>NodeId</code></a>.</p>
|
||||
<p>Dialing by <a href="../../type.NodeId.html" title="type iroh::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::dns::node_info::NodeData">Node<wbr>Data</a></div><div class="desc docblock-short">The information that can be published about a node in discovery services.</div></li><li><div class="item-name"><a class="struct" href="struct.NodeInfo.html" title="struct iroh::dns::node_info::NodeInfo">Node<wbr>Info</a></div><div class="desc docblock-short">Information about the iroh node contained in an <a href="constant.IROH_TXT_NAME.html" title="constant iroh::dns::node_info::IROH_TXT_NAME"><code>IROH_TXT_NAME</code></a> TXT resource record.</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::dns::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::dns::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.NodeData.html" title="struct iroh::dns::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::dns::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::dns::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::dns::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>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,9 +1,9 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Extension methods for `NodeId` to encode to and decode from `z32`, which is the encoding used in `pkarr` domain names."><title>NodeIdExt in iroh::dns::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" data-themes="" data-resource-suffix="" data-rustdoc-version="1.85.0-nightly (d10a6823f 2024-11-29)" data-channel="nightly" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../iroh/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="#">Node<wbr>IdExt</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.from_z32" title="from_z32">from_z32</a></li><li><a href="#tymethod.to_z32" title="to_z32">to_z32</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In iroh::<wbr>dns::<wbr>node_<wbr>info</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../../index.html">iroh</a>::<wbr><a href="../index.html">dns</a>::<wbr><a href="index.html">node_info</a></span><h1>Trait <span class="trait">NodeIdExt</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><pre class="rust item-decl"><code>pub trait NodeIdExt {
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Extension methods for `NodeId` to encode to and decode from `z32`, which is the encoding used in `pkarr` domain names."><title>NodeIdExt in iroh::dns::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" data-themes="" data-resource-suffix="" data-rustdoc-version="1.85.0-nightly (d10a6823f 2024-11-29)" data-channel="nightly" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../iroh/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="#">Node<wbr>IdExt</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.from_z32" title="from_z32">from_z32</a></li><li><a href="#tymethod.to_z32" title="to_z32">to_z32</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In iroh::<wbr>dns::<wbr>node_<wbr>info</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../../index.html">iroh</a>::<wbr><a href="../index.html">dns</a>::<wbr><a href="index.html">node_info</a></span><h1>Trait <span class="trait">NodeIdExt</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/iroh_relay/dns/node_info.rs.html#56">Source</a> </span></div><pre class="rust item-decl"><code>pub trait NodeIdExt {
|
||||
// Required methods
|
||||
fn <a href="#tymethod.to_z32" class="fn">to_z32</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>;
|
||||
<span class="item-spacer"></span> fn <a href="#tymethod.from_z32" class="fn">from_z32</a>(s: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="../../struct.PublicKey.html" title="struct iroh::PublicKey">PublicKey</a>, <a class="struct" href="https://docs.rs/anyhow/1.0.95/anyhow/struct.Error.html" title="struct anyhow::Error">Error</a>>;
|
||||
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Extension methods for <a href="../../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.</p>
|
||||
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.to_z32" class="method"><h4 class="code-header">fn <a href="#tymethod.to_z32" class="fn">to_z32</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section></summary><div class="docblock"><p>Encodes a <a href="../../type.NodeId.html" title="type iroh::NodeId"><code>NodeId</code></a> in [<code>z-base-32</code>] encoding.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.from_z32" class="method"><h4 class="code-header">fn <a href="#tymethod.from_z32" class="fn">from_z32</a>(s: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="../../struct.PublicKey.html" title="struct iroh::PublicKey">PublicKey</a>, <a class="struct" href="https://docs.rs/anyhow/1.0.95/anyhow/struct.Error.html" title="struct anyhow::Error">Error</a>></h4></section></summary><div class="docblock"><p>Parses a <a href="../../type.NodeId.html" title="type iroh::NodeId"><code>NodeId</code></a> from [<code>z-base-32</code>] encoding.</p>
|
||||
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/nightly/reference/items/traits.html#object-safety">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><section id="impl-NodeIdExt-for-PublicKey" class="impl"><a href="#impl-NodeIdExt-for-PublicKey" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.NodeIdExt.html" title="trait iroh::dns::node_info::NodeIdExt">NodeIdExt</a> for <a class="struct" href="../../struct.PublicKey.html" title="struct iroh::PublicKey">PublicKey</a></h3></section></div><script src="../../../trait.impl/iroh_relay/dns/node_info/trait.NodeIdExt.js" data-ignore-extern-crates="iroh_base" async></script></section></div></main></body></html>
|
||||
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.to_z32" class="method"><a class="src rightside" href="../../../src/iroh_relay/dns/node_info.rs.html#60">Source</a><h4 class="code-header">fn <a href="#tymethod.to_z32" class="fn">to_z32</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section></summary><div class="docblock"><p>Encodes a <a href="../../type.NodeId.html" title="type iroh::NodeId"><code>NodeId</code></a> in [<code>z-base-32</code>] encoding.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.from_z32" class="method"><a class="src rightside" href="../../../src/iroh_relay/dns/node_info.rs.html#65">Source</a><h4 class="code-header">fn <a href="#tymethod.from_z32" class="fn">from_z32</a>(s: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="../../struct.PublicKey.html" title="struct iroh::PublicKey">PublicKey</a>, <a class="struct" href="https://docs.rs/anyhow/1.0.95/anyhow/struct.Error.html" title="struct anyhow::Error">Error</a>></h4></section></summary><div class="docblock"><p>Parses a <a href="../../type.NodeId.html" title="type iroh::NodeId"><code>NodeId</code></a> from [<code>z-base-32</code>] encoding.</p>
|
||||
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/nightly/reference/items/traits.html#object-safety">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><section id="impl-NodeIdExt-for-PublicKey" class="impl"><a class="src rightside" href="../../../src/iroh_relay/dns/node_info.rs.html#68">Source</a><a href="#impl-NodeIdExt-for-PublicKey" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.NodeIdExt.html" title="trait iroh::dns::node_info::NodeIdExt">NodeIdExt</a> for <a class="struct" href="../../struct.PublicKey.html" title="struct iroh::PublicKey">PublicKey</a></h3></section></div><script src="../../../trait.impl/iroh_relay/dns/node_info/trait.NodeIdExt.js" data-ignore-extern-crates="iroh_base" async></script></section></div></main></body></html>
|
||||
File diff suppressed because one or more lines are too long
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
@@ -22,7 +22,7 @@ representation of the key.</p>
|
||||
</div><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Err" class="associatedtype trait-impl"><a class="src rightside" href="../src/iroh_base/key.rs.html#200">Source</a><a href="#associatedtype.Err" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/str/traits/trait.FromStr.html#associatedtype.Err" class="associatedtype">Err</a> = <a class="enum" href="enum.KeyParsingError.html" title="enum iroh::KeyParsingError">KeyParsingError</a></h4></section></summary><div class='docblock'>The associated error which can be returned from parsing.</div></details><details class="toggle method-toggle" open><summary><section id="method.from_str" class="method trait-impl"><a class="src rightside" href="../src/iroh_base/key.rs.html#202">Source</a><a href="#method.from_str" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/str/traits/trait.FromStr.html#tymethod.from_str" class="fn">from_str</a>(s: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="struct.PublicKey.html" title="struct iroh::PublicKey">PublicKey</a>, <<a class="struct" href="struct.PublicKey.html" title="struct iroh::PublicKey">PublicKey</a> as <a class="trait" href="https://doc.rust-lang.org/nightly/core/str/traits/trait.FromStr.html" title="trait core::str::traits::FromStr">FromStr</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/str/traits/trait.FromStr.html#associatedtype.Err" title="type core::str::traits::FromStr::Err">Err</a>></h4></section></summary><div class='docblock'>Parses a string <code>s</code> to return a value of this type. <a href="https://doc.rust-lang.org/nightly/core/str/traits/trait.FromStr.html#tymethod.from_str">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Hash-for-PublicKey" class="impl"><a class="src rightside" href="../src/iroh_base/key.rs.html#57">Source</a><a href="#impl-Hash-for-PublicKey" class="anchor">§</a><h3 class="code-header">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="struct.PublicKey.html" title="struct iroh::PublicKey">PublicKey</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.hash" class="method trait-impl"><a class="src rightside" href="../src/iroh_base/key.rs.html#58">Source</a><a href="#method.hash" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#tymethod.hash" class="fn">hash</a><H>(&self, state: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut H</a>)<div class="where">where
|
||||
H: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>,</div></h4></section></summary><div class='docblock'>Feeds this value into the given <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="trait core::hash::Hasher"><code>Hasher</code></a>. <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#tymethod.hash">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.hash_slice" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.3.0">1.3.0</span> · <a class="src" href="https://doc.rust-lang.org/nightly/src/core/hash/mod.rs.html#235-237">Source</a></span><a href="#method.hash_slice" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash_slice" class="fn">hash_slice</a><H>(data: &[Self], state: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut H</a>)<div class="where">where
|
||||
H: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>,
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Feeds a slice of this type into the given <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="trait core::hash::Hasher"><code>Hasher</code></a>. <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash_slice">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-NodeIdExt-for-PublicKey" class="impl"><a href="#impl-NodeIdExt-for-PublicKey" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="dns/node_info/trait.NodeIdExt.html" title="trait iroh::dns::node_info::NodeIdExt">NodeIdExt</a> for <a class="struct" href="struct.PublicKey.html" title="struct iroh::PublicKey">PublicKey</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_z32" class="method trait-impl"><a href="#method.to_z32" class="anchor">§</a><h4 class="code-header">fn <a href="dns/node_info/trait.NodeIdExt.html#tymethod.to_z32" class="fn">to_z32</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section></summary><div class='docblock'>Encodes a <a href="type.NodeId.html" title="type iroh::NodeId"><code>NodeId</code></a> in [<code>z-base-32</code>] encoding.</div></details><details class="toggle method-toggle" open><summary><section id="method.from_z32" class="method trait-impl"><a href="#method.from_z32" class="anchor">§</a><h4 class="code-header">fn <a href="dns/node_info/trait.NodeIdExt.html#tymethod.from_z32" class="fn">from_z32</a>(s: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="struct.PublicKey.html" title="struct iroh::PublicKey">PublicKey</a>, <a class="struct" href="https://docs.rs/anyhow/1.0.95/anyhow/struct.Error.html" title="struct anyhow::Error">Error</a>></h4></section></summary><div class='docblock'>Parses a <a href="type.NodeId.html" title="type iroh::NodeId"><code>NodeId</code></a> from [<code>z-base-32</code>] encoding.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Ord-for-PublicKey" class="impl"><a class="src rightside" href="../src/iroh_base/key.rs.html#37">Source</a><a href="#impl-Ord-for-PublicKey" class="anchor">§</a><h3 class="code-header">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="struct.PublicKey.html" title="struct iroh::PublicKey">PublicKey</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.cmp" class="method trait-impl"><a class="src rightside" href="../src/iroh_base/key.rs.html#38">Source</a><a href="#method.cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp" class="fn">cmp</a>(&self, other: &<a class="struct" href="struct.PublicKey.html" title="struct iroh::PublicKey">PublicKey</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></h4></section></summary><div class='docblock'>This method returns an <a href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering"><code>Ordering</code></a> between <code>self</code> and <code>other</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.max" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="src" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#980-982">Source</a></span><a href="#method.max" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.max" class="fn">max</a>(self, other: Self) -> Self<div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Feeds a slice of this type into the given <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="trait core::hash::Hasher"><code>Hasher</code></a>. <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash_slice">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-NodeIdExt-for-PublicKey" class="impl"><a class="src rightside" href="../src/iroh_relay/dns/node_info.rs.html#68">Source</a><a href="#impl-NodeIdExt-for-PublicKey" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="dns/node_info/trait.NodeIdExt.html" title="trait iroh::dns::node_info::NodeIdExt">NodeIdExt</a> for <a class="struct" href="struct.PublicKey.html" title="struct iroh::PublicKey">PublicKey</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_z32" class="method trait-impl"><a class="src rightside" href="../src/iroh_relay/dns/node_info.rs.html#69">Source</a><a href="#method.to_z32" class="anchor">§</a><h4 class="code-header">fn <a href="dns/node_info/trait.NodeIdExt.html#tymethod.to_z32" class="fn">to_z32</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section></summary><div class='docblock'>Encodes a <a href="type.NodeId.html" title="type iroh::NodeId"><code>NodeId</code></a> in [<code>z-base-32</code>] encoding.</div></details><details class="toggle method-toggle" open><summary><section id="method.from_z32" class="method trait-impl"><a class="src rightside" href="../src/iroh_relay/dns/node_info.rs.html#73">Source</a><a href="#method.from_z32" class="anchor">§</a><h4 class="code-header">fn <a href="dns/node_info/trait.NodeIdExt.html#tymethod.from_z32" class="fn">from_z32</a>(s: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="struct.PublicKey.html" title="struct iroh::PublicKey">PublicKey</a>, <a class="struct" href="https://docs.rs/anyhow/1.0.95/anyhow/struct.Error.html" title="struct anyhow::Error">Error</a>></h4></section></summary><div class='docblock'>Parses a <a href="type.NodeId.html" title="type iroh::NodeId"><code>NodeId</code></a> from [<code>z-base-32</code>] encoding.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Ord-for-PublicKey" class="impl"><a class="src rightside" href="../src/iroh_base/key.rs.html#37">Source</a><a href="#impl-Ord-for-PublicKey" class="anchor">§</a><h3 class="code-header">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="struct.PublicKey.html" title="struct iroh::PublicKey">PublicKey</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.cmp" class="method trait-impl"><a class="src rightside" href="../src/iroh_base/key.rs.html#38">Source</a><a href="#method.cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp" class="fn">cmp</a>(&self, other: &<a class="struct" href="struct.PublicKey.html" title="struct iroh::PublicKey">PublicKey</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></h4></section></summary><div class='docblock'>This method returns an <a href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering"><code>Ordering</code></a> between <code>self</code> and <code>other</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.max" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="src" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#980-982">Source</a></span><a href="#method.max" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.max" class="fn">max</a>(self, other: Self) -> Self<div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Compares and returns the maximum of two values. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.max">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.min" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="src" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1001-1003">Source</a></span><a href="#method.min" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.min" class="fn">min</a>(self, other: Self) -> Self<div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Compares and returns the minimum of two values. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.min">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clamp" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.50.0">1.50.0</span> · <a class="src" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1027-1029">Source</a></span><a href="#method.clamp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.clamp" class="fn">clamp</a>(self, min: Self, max: Self) -> Self<div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Restrict a value to a certain interval. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.clamp">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq-for-PublicKey" class="impl"><a class="src rightside" href="../src/iroh_base/key.rs.html#21">Source</a><a href="#impl-PartialEq-for-PublicKey" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="struct" href="struct.PublicKey.html" title="struct iroh::PublicKey">PublicKey</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl"><a class="src rightside" href="../src/iroh_base/key.rs.html#21">Source</a><a href="#method.eq" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.PublicKey.html" title="struct iroh::PublicKey">PublicKey</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#261">Source</a></span><a href="#method.ne" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests for <code>!=</code>. The default implementation is almost always sufficient,
|
||||
|
||||
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="Runs a relay server with STUN and QUIC enabled suitable for tests."><title>run_relay_server in iroh::test_utils - 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>test_<wbr>utils</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">test_utils</a></span><h1>Function <span class="fn">run_relay_server</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/test_utils.rs.html#32-40">Source</a> </span></div><pre class="rust item-decl"><code>pub async fn run_relay_server() -> <a class="type" href="https://docs.rs/anyhow/1.0.95/anyhow/type.Result.html" title="type anyhow::Result">Result</a><(<a class="struct" href="../struct.RelayMap.html" title="struct iroh::RelayMap">RelayMap</a>, <a class="struct" href="../struct.RelayUrl.html" title="struct iroh::RelayUrl">RelayUrl</a>, Server)></code></pre><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>test-utils</code></strong> only.</div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Runs a relay server with STUN and QUIC enabled suitable for tests.</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="Runs a relay server with STUN and QUIC enabled suitable for tests."><title>run_relay_server in iroh::test_utils - 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>test_<wbr>utils</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">test_utils</a></span><h1>Function <span class="fn">run_relay_server</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/test_utils.rs.html#32-40">Source</a> </span></div><pre class="rust item-decl"><code>pub async fn run_relay_server() -> <a class="type" href="https://docs.rs/anyhow/1.0.95/anyhow/type.Result.html" title="type anyhow::Result">Result</a><(<a class="struct" href="../struct.RelayMap.html" title="struct iroh::RelayMap">RelayMap</a>, <a class="struct" href="../struct.RelayUrl.html" title="struct iroh::RelayUrl">RelayUrl</a>, <a class="struct" href="../../iroh_relay/server/struct.Server.html" title="struct iroh_relay::server::Server">Server</a>)></code></pre><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>test-utils</code></strong> only.</div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Runs a relay server with STUN and QUIC enabled suitable for tests.</p>
|
||||
<p>The returned <code>Url</code> is the url of the relay server in the returned <a href="../struct.RelayMap.html" title="struct iroh::RelayMap"><code>RelayMap</code></a>.
|
||||
When dropped, the returned [<code>Server</code>] does will stop running.</p>
|
||||
When dropped, the returned <a href="../../iroh_relay/server/struct.Server.html" title="struct iroh_relay::server::Server"><code>Server</code></a> does will stop running.</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
@@ -1,9 +1,9 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Runs a relay server."><title>run_relay_server_with in iroh::test_utils - 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>test_<wbr>utils</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">test_utils</a></span><h1>Function <span class="fn">run_relay_server_with</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/test_utils.rs.html#65-110">Source</a> </span></div><pre class="rust item-decl"><code>pub async fn run_relay_server_with(
|
||||
stun: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><StunConfig>,
|
||||
stun: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../iroh_relay/server/struct.StunConfig.html" title="struct iroh_relay::server::StunConfig">StunConfig</a>>,
|
||||
quic: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,
|
||||
) -> <a class="type" href="https://docs.rs/anyhow/1.0.95/anyhow/type.Result.html" title="type anyhow::Result">Result</a><(<a class="struct" href="../struct.RelayMap.html" title="struct iroh::RelayMap">RelayMap</a>, <a class="struct" href="../struct.RelayUrl.html" title="struct iroh::RelayUrl">RelayUrl</a>, Server)></code></pre><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>test-utils</code></strong> only.</div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Runs a relay server.</p>
|
||||
) -> <a class="type" href="https://docs.rs/anyhow/1.0.95/anyhow/type.Result.html" title="type anyhow::Result">Result</a><(<a class="struct" href="../struct.RelayMap.html" title="struct iroh::RelayMap">RelayMap</a>, <a class="struct" href="../struct.RelayUrl.html" title="struct iroh::RelayUrl">RelayUrl</a>, <a class="struct" href="../../iroh_relay/server/struct.Server.html" title="struct iroh_relay::server::Server">Server</a>)></code></pre><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>test-utils</code></strong> only.</div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Runs a relay server.</p>
|
||||
<p><code>stun</code> can be set to <code>None</code> to disable stun, or set to <code>Some</code> <code>StunConfig</code>,
|
||||
to enable stun on a specific socket.</p>
|
||||
<p>If <code>quic</code> is set to <code>true</code>, it will make the appropriate [<code>QuicConfig</code>] from the generated tls certificates and run the quic server at a random free port.</p>
|
||||
<p>If <code>quic</code> is set to <code>true</code>, it will make the appropriate <a href="../../iroh_relay/server/struct.QuicConfig.html" title="struct iroh_relay::server::QuicConfig"><code>QuicConfig</code></a> from the generated tls certificates and run the quic server at a random free port.</p>
|
||||
<p>The return value is similar to <a href="fn.run_relay_server.html" title="fn iroh::test_utils::run_relay_server"><code>run_relay_server</code></a>.</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="Runs a relay server with STUN enabled suitable for tests."><title>run_relay_server_with_stun in iroh::test_utils - 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>test_<wbr>utils</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">test_utils</a></span><h1>Function <span class="fn">run_relay_server_with_stun</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/test_utils.rs.html#46-54">Source</a> </span></div><pre class="rust item-decl"><code>pub async fn run_relay_server_with_stun() -> <a class="type" href="https://docs.rs/anyhow/1.0.95/anyhow/type.Result.html" title="type anyhow::Result">Result</a><(<a class="struct" href="../struct.RelayMap.html" title="struct iroh::RelayMap">RelayMap</a>, <a class="struct" href="../struct.RelayUrl.html" title="struct iroh::RelayUrl">RelayUrl</a>, Server)></code></pre><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>test-utils</code></strong> only.</div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Runs a relay server with STUN enabled suitable for tests.</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="Runs a relay server with STUN enabled suitable for tests."><title>run_relay_server_with_stun in iroh::test_utils - 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>test_<wbr>utils</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">test_utils</a></span><h1>Function <span class="fn">run_relay_server_with_stun</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/test_utils.rs.html#46-54">Source</a> </span></div><pre class="rust item-decl"><code>pub async fn run_relay_server_with_stun() -> <a class="type" href="https://docs.rs/anyhow/1.0.95/anyhow/type.Result.html" title="type anyhow::Result">Result</a><(<a class="struct" href="../struct.RelayMap.html" title="struct iroh::RelayMap">RelayMap</a>, <a class="struct" href="../struct.RelayUrl.html" title="struct iroh::RelayUrl">RelayUrl</a>, <a class="struct" href="../../iroh_relay/server/struct.Server.html" title="struct iroh_relay::server::Server">Server</a>)></code></pre><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>test-utils</code></strong> only.</div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Runs a relay server with STUN enabled suitable for tests.</p>
|
||||
<p>The returned <code>Url</code> is the url of the relay server in the returned <a href="../struct.RelayMap.html" title="struct iroh::RelayMap"><code>RelayMap</code></a>.
|
||||
When dropped, the returned [<code>Server</code>] does will stop running.</p>
|
||||
When dropped, the returned <a href="../../iroh_relay/server/struct.Server.html" title="struct iroh_relay::server::Server"><code>Server</code></a> does will stop running.</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
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="The n0 testing DNS node origin, for production."><title>N0_DNS_NODE_ORIGIN_PROD in iroh_relay::dns - 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 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_relay/index.html">iroh_<wbr>relay</a><span class="version">0.32.0</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In iroh_<wbr>relay::<wbr>dns</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">iroh_relay</a>::<wbr><a href="index.html">dns</a></span><h1>Constant <span class="constant">N0_DNS_NODE_ORIGIN_PROD</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/dns.rs.html#21">Source</a> </span></div><pre class="rust item-decl"><code>pub const N0_DNS_NODE_ORIGIN_PROD: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = "dns.iroh.link";</code></pre><span class="item-info"><div class="stab portability">Available on <strong>non-<code>wasm_browser</code></strong> only.</div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The n0 testing DNS node origin, for production.</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 n0 testing DNS node origin, for production."><title>N0_DNS_NODE_ORIGIN_PROD in iroh_relay::dns - 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 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_relay/index.html">iroh_<wbr>relay</a><span class="version">0.32.0</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In iroh_<wbr>relay::<wbr>dns</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">iroh_relay</a>::<wbr><a href="index.html">dns</a></span><h1>Constant <span class="constant">N0_DNS_NODE_ORIGIN_PROD</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/dns.rs.html#22">Source</a> </span></div><pre class="rust item-decl"><code>pub const N0_DNS_NODE_ORIGIN_PROD: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = "dns.iroh.link";</code></pre><span class="item-info"><div class="stab portability">Available on <strong>non-<code>wasm_browser</code></strong> only.</div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The n0 testing DNS node origin, for production.</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="The n0 testing DNS node origin, for testing."><title>N0_DNS_NODE_ORIGIN_STAGING in iroh_relay::dns - 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 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_relay/index.html">iroh_<wbr>relay</a><span class="version">0.32.0</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In iroh_<wbr>relay::<wbr>dns</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">iroh_relay</a>::<wbr><a href="index.html">dns</a></span><h1>Constant <span class="constant">N0_DNS_NODE_ORIGIN_STAGING</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/dns.rs.html#23">Source</a> </span></div><pre class="rust item-decl"><code>pub const N0_DNS_NODE_ORIGIN_STAGING: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = "staging-dns.iroh.link";</code></pre><span class="item-info"><div class="stab portability">Available on <strong>non-<code>wasm_browser</code></strong> only.</div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The n0 testing DNS node origin, for testing.</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 n0 testing DNS node origin, for testing."><title>N0_DNS_NODE_ORIGIN_STAGING in iroh_relay::dns - 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 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_relay/index.html">iroh_<wbr>relay</a><span class="version">0.32.0</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In iroh_<wbr>relay::<wbr>dns</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">iroh_relay</a>::<wbr><a href="index.html">dns</a></span><h1>Constant <span class="constant">N0_DNS_NODE_ORIGIN_STAGING</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/dns.rs.html#24">Source</a> </span></div><pre class="rust item-decl"><code>pub const N0_DNS_NODE_ORIGIN_STAGING: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = "staging-dns.iroh.link";</code></pre><span class="item-info"><div class="stab portability">Available on <strong>non-<code>wasm_browser</code></strong> only.</div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The n0 testing DNS node origin, for testing.</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="DNS resolver"><title>iroh_relay::dns - 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 dns</a></h2><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="#constants" title="Constants">Constants</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>dns</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/dns.rs.html#1-409">Source</a> </span></div><span class="item-info"><div class="stab portability">Available on <strong>non-<code>wasm_browser</code></strong> only.</div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>DNS resolver</p>
|
||||
</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="node_info/index.html" title="mod iroh_relay::dns::node_info">node_<wbr>info</a></div><div class="desc docblock-short">Support for handling DNS resource records for dialing by <a href="../../iroh_base/key/type.NodeId.html" title="type iroh_base::key::NodeId"><code>NodeId</code></a>.</div></li></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.DnsResolver.html" title="struct iroh_relay::dns::DnsResolver">DnsResolver</a></div><div class="desc docblock-short">The DNS resolver used throughout <code>iroh</code>.</div></li><li><div class="item-name"><a class="struct" href="struct.TXT.html" title="struct iroh_relay::dns::TXT">TXT</a></div><div class="desc docblock-short">Record data for a TXT record</div></li><li><div class="item-name"><a class="struct" href="struct.TxtLookup.html" title="struct iroh_relay::dns::TxtLookup">TxtLookup</a></div><div class="desc docblock-short">TXT records returned from <a href="struct.DnsResolver.html#method.lookup_txt" title="method iroh_relay::dns::DnsResolver::lookup_txt"><code>DnsResolver::lookup_txt</code></a></div></li></ul><h2 id="constants" class="section-header">Constants<a href="#constants" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="constant" href="constant.N0_DNS_NODE_ORIGIN_PROD.html" title="constant iroh_relay::dns::N0_DNS_NODE_ORIGIN_PROD">N0_<wbr>DNS_<wbr>NODE_<wbr>ORIGIN_<wbr>PROD</a></div><div class="desc docblock-short">The n0 testing DNS node origin, for production.</div></li><li><div class="item-name"><a class="constant" href="constant.N0_DNS_NODE_ORIGIN_STAGING.html" title="constant iroh_relay::dns::N0_DNS_NODE_ORIGIN_STAGING">N0_<wbr>DNS_<wbr>NODE_<wbr>ORIGIN_<wbr>STAGING</a></div><div class="desc docblock-short">The n0 testing DNS node origin, for testing.</div></li></ul></section></div></main></body></html>
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="DNS resolver"><title>iroh_relay::dns - 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 dns</a></h2><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="#constants" title="Constants">Constants</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>dns</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/dns.rs.html#1-410">Source</a> </span></div><span class="item-info"><div class="stab portability">Available on <strong>non-<code>wasm_browser</code></strong> only.</div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>DNS resolver</p>
|
||||
</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="node_info/index.html" title="mod iroh_relay::dns::node_info">node_<wbr>info</a></div><div class="desc docblock-short">Support for handling DNS resource records for dialing by [<code>NodeId</code>].</div></li></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.DnsResolver.html" title="struct iroh_relay::dns::DnsResolver">DnsResolver</a></div><div class="desc docblock-short">The DNS resolver used throughout <code>iroh</code>.</div></li><li><div class="item-name"><a class="struct" href="struct.TXT.html" title="struct iroh_relay::dns::TXT">TXT</a></div><div class="desc docblock-short">Record data for a TXT record</div></li><li><div class="item-name"><a class="struct" href="struct.TxtLookup.html" title="struct iroh_relay::dns::TxtLookup">TxtLookup</a></div><div class="desc docblock-short">TXT records returned from <a href="struct.DnsResolver.html#method.lookup_txt" title="method iroh_relay::dns::DnsResolver::lookup_txt"><code>DnsResolver::lookup_txt</code></a></div></li></ul><h2 id="constants" class="section-header">Constants<a href="#constants" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="constant" href="constant.N0_DNS_NODE_ORIGIN_PROD.html" title="constant iroh_relay::dns::N0_DNS_NODE_ORIGIN_PROD">N0_<wbr>DNS_<wbr>NODE_<wbr>ORIGIN_<wbr>PROD</a></div><div class="desc docblock-short">The n0 testing DNS node origin, for production.</div></li><li><div class="item-name"><a class="constant" href="constant.N0_DNS_NODE_ORIGIN_STAGING.html" title="constant iroh_relay::dns::N0_DNS_NODE_ORIGIN_STAGING">N0_<wbr>DNS_<wbr>NODE_<wbr>ORIGIN_<wbr>STAGING</a></div><div class="desc docblock-short">The n0 testing DNS node origin, for testing.</div></li></ul></section></div></main></body></html>
|
||||
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Support for handling DNS resource records for dialing by `NodeId`."><title>iroh_relay::dns::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><a href="../index.html">In iroh_<wbr>relay::<wbr>dns</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../../index.html">iroh_relay</a>::<wbr><a href="../index.html">dns</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/dns/node_info.rs.html#1-586">Source</a> </span></div><span class="item-info"><div class="stab portability">Available on <strong>non-<code>wasm_browser</code></strong> only.</div></span><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
|
||||
<!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::dns::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><a href="../index.html">In iroh_<wbr>relay::<wbr>dns</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../../index.html">iroh_relay</a>::<wbr><a href="../index.html">dns</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/dns/node_info.rs.html#1-633">Source</a> </span></div><span class="item-info"><div class="stab portability">Available on <strong>non-<code>wasm_browser</code></strong> only.</div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Support for handling DNS resource records for dialing by [<code>NodeId</code>].</p>
|
||||
<p>Dialing by [<code>NodeId</code>] is supported by iroh nodes publishing <a href="https://app.pkarr.org">Pkarr</a> records to DNS
|
||||
servers or the Mainline DHT. This module supports creating and parsing these records.</p>
|
||||
<p>DNS records are published under the following names:</p>
|
||||
<p><code>_iroh.<z32-node-id>.<origin-domain> TXT</code></p>
|
||||
@@ -8,7 +8,7 @@ servers or the Mainline DHT. This module supports creating and parsing these re
|
||||
<p><code>_iroh</code> is the record name as defined by <a href="constant.IROH_TXT_NAME.html" title="constant iroh_relay::dns::node_info::IROH_TXT_NAME"><code>IROH_TXT_NAME</code></a>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code><z32-node-id></code> is the <a href="https://philzimmermann.com/docs/human-oriented-base-32-encoding.txt">z-base-32</a> encoding of the <a href="../../../iroh_base/key/type.NodeId.html" title="type iroh_base::key::NodeId"><code>NodeId</code></a>.</p>
|
||||
<p><code><z32-node-id></code> is the <a href="https://philzimmermann.com/docs/human-oriented-base-32-encoding.txt">z-base-32</a> encoding of the [<code>NodeId</code>].</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code><origin-domain></code> is the domain name of the publishing DNS server,
|
||||
@@ -23,12 +23,12 @@ servers or the Mainline DHT. This module supports creating and parsing these re
|
||||
in <a href="https://www.rfc-editor.org/rfc/rfc1464">RFC1464</a>. The following attributes are defined:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>relay=<url></code>: The home <a href="../../../iroh_base/relay_url/struct.RelayUrl.html" title="struct iroh_base::relay_url::RelayUrl"><code>RelayUrl</code></a> of this node.</p>
|
||||
<p><code>relay=<url></code>: The home <a href="iroh_base::RelayUrl"><code>RelayUrl</code></a> of this node.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>addr=<addr> <addr></code>: A space-separated list of sockets addresses for this iroh node.
|
||||
Each address is an IPv4 or IPv6 address with a port.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.NodeData.html" title="struct iroh_relay::dns::node_info::NodeData">Node<wbr>Data</a></div><div class="desc docblock-short">The information that can be published about a node in discovery services.</div></li><li><div class="item-name"><a class="struct" href="struct.NodeInfo.html" title="struct iroh_relay::dns::node_info::NodeInfo">Node<wbr>Info</a></div><div class="desc docblock-short">Information about the iroh node contained in an <a href="constant.IROH_TXT_NAME.html" title="constant iroh_relay::dns::node_info::IROH_TXT_NAME"><code>IROH_TXT_NAME</code></a> TXT resource record.</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::dns::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::dns::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.NodeData.html" title="struct iroh_relay::dns::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::dns::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::dns::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::dns::node_info::NodeIdExt">Node<wbr>IdExt</a></div><div class="desc docblock-short">Extension methods for [<code>NodeId</code>] to encode to and decode from [<code>z32</code>],
|
||||
which is the encoding used in [<code>pkarr</code>] domain names.</div></li></ul></section></div></main></body></html>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,9 +1,9 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Extension methods for `NodeId` to encode to and decode from `z32`, which is the encoding used in `pkarr` domain names."><title>NodeIdExt in iroh_relay::dns::node_info - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-dbdb5eec.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="iroh_relay" data-themes="" data-resource-suffix="" data-rustdoc-version="1.85.0-nightly (d10a6823f 2024-11-29)" data-channel="nightly" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../iroh_relay/index.html">iroh_<wbr>relay</a><span class="version">0.32.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Node<wbr>IdExt</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.from_z32" title="from_z32">from_z32</a></li><li><a href="#tymethod.to_z32" title="to_z32">to_z32</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-NodeIdExt-for-PublicKey" title="NodeId">NodeId</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In iroh_<wbr>relay::<wbr>dns::<wbr>node_<wbr>info</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../../index.html">iroh_relay</a>::<wbr><a href="../index.html">dns</a>::<wbr><a href="index.html">node_info</a></span><h1>Trait <span class="trait">NodeIdExt</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/iroh_relay/dns/node_info.rs.html#56-66">Source</a> </span></div><pre class="rust item-decl"><code>pub trait NodeIdExt {
|
||||
// Required methods
|
||||
fn <a href="#tymethod.to_z32" class="fn">to_z32</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>;
|
||||
<span class="item-spacer"></span> fn <a href="#tymethod.from_z32" class="fn">from_z32</a>(s: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="type" href="https://docs.rs/anyhow/1.0.95/anyhow/type.Result.html" title="type anyhow::Result">Result</a><<a class="type" href="../../../iroh_base/key/type.NodeId.html" title="type iroh_base::key::NodeId">NodeId</a>>;
|
||||
}</code></pre><span class="item-info"><div class="stab portability">Available on <strong>non-<code>wasm_browser</code></strong> only.</div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Extension methods for <a href="../../../iroh_base/key/type.NodeId.html" title="type iroh_base::key::NodeId"><code>NodeId</code></a> to encode to and decode from [<code>z32</code>],
|
||||
<span class="item-spacer"></span> fn <a href="#tymethod.from_z32" class="fn">from_z32</a>(s: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="type" href="https://docs.rs/anyhow/1.0.95/anyhow/type.Result.html" title="type anyhow::Result">Result</a><NodeId>;
|
||||
}</code></pre><span class="item-info"><div class="stab portability">Available on <strong>non-<code>wasm_browser</code></strong> only.</div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Extension methods for [<code>NodeId</code>] to encode to and decode from [<code>z32</code>],
|
||||
which is the encoding used in [<code>pkarr</code>] domain names.</p>
|
||||
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.to_z32" class="method"><a class="src rightside" href="../../../src/iroh_relay/dns/node_info.rs.html#60">Source</a><h4 class="code-header">fn <a href="#tymethod.to_z32" class="fn">to_z32</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section></summary><div class="docblock"><p>Encodes a <a href="../../../iroh_base/key/type.NodeId.html" title="type iroh_base::key::NodeId"><code>NodeId</code></a> in [<code>z-base-32</code>] encoding.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.from_z32" class="method"><a class="src rightside" href="../../../src/iroh_relay/dns/node_info.rs.html#65">Source</a><h4 class="code-header">fn <a href="#tymethod.from_z32" class="fn">from_z32</a>(s: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="type" href="https://docs.rs/anyhow/1.0.95/anyhow/type.Result.html" title="type anyhow::Result">Result</a><<a class="type" href="../../../iroh_base/key/type.NodeId.html" title="type iroh_base::key::NodeId">NodeId</a>></h4></section></summary><div class="docblock"><p>Parses a <a href="../../../iroh_base/key/type.NodeId.html" title="type iroh_base::key::NodeId"><code>NodeId</code></a> from [<code>z-base-32</code>] encoding.</p>
|
||||
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/nightly/reference/items/traits.html#object-safety">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><details class="toggle implementors-toggle"><summary><section id="impl-NodeIdExt-for-PublicKey" class="impl"><a class="src rightside" href="../../../src/iroh_relay/dns/node_info.rs.html#68-79">Source</a><a href="#impl-NodeIdExt-for-PublicKey" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.NodeIdExt.html" title="trait iroh_relay::dns::node_info::NodeIdExt">NodeIdExt</a> for <a class="type" href="../../../iroh_base/key/type.NodeId.html" title="type iroh_base::key::NodeId">NodeId</a></h3></section></summary><div class="impl-items"><section id="method.to_z32" class="method trait-impl"><a class="src rightside" href="../../../src/iroh_relay/dns/node_info.rs.html#69-71">Source</a><a href="#method.to_z32" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_z32" class="fn">to_z32</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section><section id="method.from_z32" class="method trait-impl"><a class="src rightside" href="../../../src/iroh_relay/dns/node_info.rs.html#73-78">Source</a><a href="#method.from_z32" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.from_z32" class="fn">from_z32</a>(s: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="type" href="https://docs.rs/anyhow/1.0.95/anyhow/type.Result.html" title="type anyhow::Result">Result</a><<a class="type" href="../../../iroh_base/key/type.NodeId.html" title="type iroh_base::key::NodeId">NodeId</a>></h4></section></div></details><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../../../trait.impl/iroh_relay/dns/node_info/trait.NodeIdExt.js" data-ignore-extern-crates="iroh_base" async></script></section></div></main></body></html>
|
||||
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.to_z32" class="method"><a class="src rightside" href="../../../src/iroh_relay/dns/node_info.rs.html#60">Source</a><h4 class="code-header">fn <a href="#tymethod.to_z32" class="fn">to_z32</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section></summary><div class="docblock"><p>Encodes a [<code>NodeId</code>] in [<code>z-base-32</code>] encoding.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.from_z32" class="method"><a class="src rightside" href="../../../src/iroh_relay/dns/node_info.rs.html#65">Source</a><h4 class="code-header">fn <a href="#tymethod.from_z32" class="fn">from_z32</a>(s: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="type" href="https://docs.rs/anyhow/1.0.95/anyhow/type.Result.html" title="type anyhow::Result">Result</a><NodeId></h4></section></summary><div class="docblock"><p>Parses a [<code>NodeId</code>] from [<code>z-base-32</code>] encoding.</p>
|
||||
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/nightly/reference/items/traits.html#object-safety">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><details class="toggle implementors-toggle"><summary><section id="impl-NodeIdExt-for-PublicKey" class="impl"><a class="src rightside" href="../../../src/iroh_relay/dns/node_info.rs.html#68-79">Source</a><a href="#impl-NodeIdExt-for-PublicKey" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.NodeIdExt.html" title="trait iroh_relay::dns::node_info::NodeIdExt">NodeIdExt</a> for NodeId</h3></section></summary><div class="impl-items"><section id="method.to_z32" class="method trait-impl"><a class="src rightside" href="../../../src/iroh_relay/dns/node_info.rs.html#69-71">Source</a><a href="#method.to_z32" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_z32" class="fn">to_z32</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section><section id="method.from_z32" class="method trait-impl"><a class="src rightside" href="../../../src/iroh_relay/dns/node_info.rs.html#73-78">Source</a><a href="#method.from_z32" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.from_z32" class="fn">from_z32</a>(s: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="type" href="https://docs.rs/anyhow/1.0.95/anyhow/type.Result.html" title="type anyhow::Result">Result</a><NodeId></h4></section></div></details><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../../../trait.impl/iroh_relay/dns/node_info/trait.NodeIdExt.js" data-ignore-extern-crates="iroh_base" async></script></section></div></main></body></html>
|
||||
File diff suppressed because one or more lines are too long
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,9 +14,9 @@ case there is an error in the server before it is shut down.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.quic_addr" class="method"><a class="src rightside" href="../../src/iroh_relay/server.rs.html#480-482">Source</a><h4 class="code-header">pub fn <a href="#method.quic_addr" class="fn">quic_addr</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/net/socket_addr/enum.SocketAddr.html" title="enum core::net::socket_addr::SocketAddr">SocketAddr</a>></h4></section></summary><div class="docblock"><p>The socket address the QUIC server is listening on.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.stun_addr" class="method"><a class="src rightside" href="../../src/iroh_relay/server.rs.html#485-487">Source</a><h4 class="code-header">pub fn <a href="#method.stun_addr" class="fn">stun_addr</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/net/socket_addr/enum.SocketAddr.html" title="enum core::net::socket_addr::SocketAddr">SocketAddr</a>></h4></section></summary><div class="docblock"><p>The socket address the STUN server is listening on.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.certificates" class="method"><a class="src rightside" href="../../src/iroh_relay/server.rs.html#490-492">Source</a><h4 class="code-header">pub fn <a href="#method.certificates" class="fn">certificates</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><CertificateDer<'static>>></h4></section></summary><div class="docblock"><p>The certificates chain if configured with manual TLS certificates.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.https_url" class="method"><a class="src rightside" href="../../src/iroh_relay/server.rs.html#498-504">Source</a><h4 class="code-header">pub fn <a href="#method.https_url" class="fn">https_url</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../iroh_base/relay_url/struct.RelayUrl.html" title="struct iroh_base::relay_url::RelayUrl">RelayUrl</a>></h4></section><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>test-utils</code></strong> only.</div></span></summary><div class="docblock"><p>Get the server’s https <a href="../../iroh_base/relay_url/struct.RelayUrl.html" title="struct iroh_base::relay_url::RelayUrl"><code>RelayUrl</code></a>.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.https_url" class="method"><a class="src rightside" href="../../src/iroh_relay/server.rs.html#498-504">Source</a><h4 class="code-header">pub fn <a href="#method.https_url" class="fn">https_url</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><RelayUrl></h4></section><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>test-utils</code></strong> only.</div></span></summary><div class="docblock"><p>Get the server’s https [<code>RelayUrl</code>].</p>
|
||||
<p>This uses <a href="struct.Server.html#method.https_addr" title="method iroh_relay::server::Server::https_addr"><code>Self::https_addr</code></a> so it’s mostly useful for local development.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.http_url" class="method"><a class="src rightside" href="../../src/iroh_relay/server.rs.html#510-516">Source</a><h4 class="code-header">pub fn <a href="#method.http_url" class="fn">http_url</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../iroh_base/relay_url/struct.RelayUrl.html" title="struct iroh_base::relay_url::RelayUrl">RelayUrl</a>></h4></section><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>test-utils</code></strong> only.</div></span></summary><div class="docblock"><p>Get the server’s http <a href="../../iroh_base/relay_url/struct.RelayUrl.html" title="struct iroh_base::relay_url::RelayUrl"><code>RelayUrl</code></a>.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.http_url" class="method"><a class="src rightside" href="../../src/iroh_relay/server.rs.html#510-516">Source</a><h4 class="code-header">pub fn <a href="#method.http_url" class="fn">http_url</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><RelayUrl></h4></section><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>test-utils</code></strong> only.</div></span></summary><div class="docblock"><p>Get the server’s http [<code>RelayUrl</code>].</p>
|
||||
<p>This uses <a href="struct.Server.html#method.http_addr" title="method iroh_relay::server::Server::http_addr"><code>Self::http_addr</code></a> so it’s mostly useful for local development.</p>
|
||||
</div></details></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-Server" class="impl"><a class="src rightside" href="../../src/iroh_relay/server.rs.html#248">Source</a><a href="#impl-Debug-for-Server" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Server.html" title="struct iroh_relay::server::Server">Server</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/iroh_relay/server.rs.html#248">Source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, __derive_more_f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-Freeze-for-Server" class="impl"><a href="#impl-Freeze-for-Server" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.Server.html" title="struct iroh_relay::server::Server">Server</a></h3></section><section id="impl-RefUnwindSafe-for-Server" class="impl"><a href="#impl-RefUnwindSafe-for-Server" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Server.html" title="struct iroh_relay::server::Server">Server</a></h3></section><section id="impl-Send-for-Server" class="impl"><a href="#impl-Send-for-Server" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Server.html" title="struct iroh_relay::server::Server">Server</a></h3></section><section id="impl-Sync-for-Server" class="impl"><a href="#impl-Sync-for-Server" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Server.html" title="struct iroh_relay::server::Server">Server</a></h3></section><section id="impl-Unpin-for-Server" class="impl"><a href="#impl-Unpin-for-Server" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Server.html" title="struct iroh_relay::server::Server">Server</a></h3></section><section id="impl-UnwindSafe-for-Server" class="impl"><a href="#impl-UnwindSafe-for-Server" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Server.html" title="struct iroh_relay::server::Server">Server</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#138">Source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where
|
||||
T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#139">Source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-AsTaggedExplicit%3C'a,+E%3E-for-T" class="impl"><a href="#impl-AsTaggedExplicit%3C'a,+E%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<'a, T, E> AsTaggedExplicit<'a, E> for T<div class="where">where
|
||||
|
||||
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
@@ -910,7 +910,35 @@
|
||||
<a href="#909" id="909">909</a>
|
||||
<a href="#910" id="910">910</a>
|
||||
<a href="#911" id="911">911</a>
|
||||
<a href="#912" id="912">912</a></pre></div><pre class="rust"><code><span class="doccomment">//! Node address discovery.
|
||||
<a href="#912" id="912">912</a>
|
||||
<a href="#913" id="913">913</a>
|
||||
<a href="#914" id="914">914</a>
|
||||
<a href="#915" id="915">915</a>
|
||||
<a href="#916" id="916">916</a>
|
||||
<a href="#917" id="917">917</a>
|
||||
<a href="#918" id="918">918</a>
|
||||
<a href="#919" id="919">919</a>
|
||||
<a href="#920" id="920">920</a>
|
||||
<a href="#921" id="921">921</a>
|
||||
<a href="#922" id="922">922</a>
|
||||
<a href="#923" id="923">923</a>
|
||||
<a href="#924" id="924">924</a>
|
||||
<a href="#925" id="925">925</a>
|
||||
<a href="#926" id="926">926</a>
|
||||
<a href="#927" id="927">927</a>
|
||||
<a href="#928" id="928">928</a>
|
||||
<a href="#929" id="929">929</a>
|
||||
<a href="#930" id="930">930</a>
|
||||
<a href="#931" id="931">931</a>
|
||||
<a href="#932" id="932">932</a>
|
||||
<a href="#933" id="933">933</a>
|
||||
<a href="#934" id="934">934</a>
|
||||
<a href="#935" id="935">935</a>
|
||||
<a href="#936" id="936">936</a>
|
||||
<a href="#937" id="937">937</a>
|
||||
<a href="#938" id="938">938</a>
|
||||
<a href="#939" id="939">939</a>
|
||||
<a href="#940" id="940">940</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`].
|
||||
@@ -1005,6 +1033,7 @@
|
||||
//! # }
|
||||
//! ```
|
||||
//!
|
||||
//! [`NodeAddr`]: iroh_base::NodeAddr
|
||||
//! [`RelayUrl`]: crate::RelayUrl
|
||||
//! [`Builder::discovery`]: crate::endpoint::Builder::discovery
|
||||
//! [`DnsDiscovery`]: dns::DnsDiscovery
|
||||
@@ -1106,49 +1135,73 @@
|
||||
<span class="kw">impl</span><T: Discovery> Discovery <span class="kw">for </span>Arc<T> {}
|
||||
|
||||
<span class="doccomment">/// The results returned from [`Discovery::resolve`].
|
||||
///
|
||||
/// This struct derefs to [`NodeData`], so you can access the methods from [`NodeData`]
|
||||
/// directly from [`DiscoveryItem`].
|
||||
</span><span class="attr">#[derive(Debug, Clone)]
|
||||
</span><span class="kw">pub struct </span>DiscoveryItem {
|
||||
<span class="doccomment">/// The [`NodeId`] whose address we have discovered
|
||||
</span><span class="kw">pub </span>node_addr: NodeAddr,
|
||||
<span class="doccomment">/// The node info for the node, as discovered by the the discovery service.
|
||||
</span>node_info: NodeInfo,
|
||||
<span class="doccomment">/// A static string to identify the discovery source.
|
||||
///
|
||||
/// Should be uniform per discovery service.
|
||||
</span><span class="kw">pub </span>provenance: <span class="kw-2">&</span><span class="lifetime">'static </span>str,
|
||||
</span>provenance: <span class="kw-2">&</span><span class="lifetime">'static </span>str,
|
||||
<span class="doccomment">/// Optional timestamp when this node address info was last updated.
|
||||
///
|
||||
/// Must be microseconds since the unix epoch.
|
||||
</span><span class="comment">// TODO(ramfox): this is currently unused. As we develop more `DiscoveryService`s, we may discover that we do not need this. It is only truly relevant when comparing `relay_urls`, since we can attempt to dial any number of socket addresses, but expect each node to have one "home relay" that we will attempt to contact them on. This means we would need some way to determine which relay url to choose between, if more than one relay url is reported.
|
||||
</span><span class="kw">pub </span>last_updated: <span class="prelude-ty">Option</span><u64>,
|
||||
</span>last_updated: <span class="prelude-ty">Option</span><u64>,
|
||||
}
|
||||
|
||||
<span class="kw">impl </span>std::ops::Deref <span class="kw">for </span>DiscoveryItem {
|
||||
<span class="kw">type </span>Target = NodeData;
|
||||
<span class="kw">fn </span>deref(<span class="kw-2">&</span><span class="self">self</span>) -> <span class="kw-2">&</span><span class="self">Self</span>::Target {
|
||||
<span class="kw-2">&</span><span class="self">self</span>.node_info.data
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">impl </span>DiscoveryItem {
|
||||
<span class="doccomment">/// Creates a new [`DiscoveryItem`] from a [`NodeInfo`].
|
||||
</span><span class="kw">pub fn </span>from_node_info(
|
||||
node_info: NodeInfo,
|
||||
provenance: <span class="kw-2">&</span><span class="lifetime">'static </span>str,
|
||||
last_updated: <span class="prelude-ty">Option</span><u64>,
|
||||
) -> <span class="self">Self </span>{
|
||||
<span class="kw">let </span>node_addr = node_info.into();
|
||||
</span><span class="kw">pub fn </span>new(node_info: NodeInfo, provenance: <span class="kw-2">&</span><span class="lifetime">'static </span>str, last_updated: <span class="prelude-ty">Option</span><u64>) -> <span class="self">Self </span>{
|
||||
<span class="self">Self </span>{
|
||||
node_addr,
|
||||
node_info,
|
||||
provenance,
|
||||
last_updated,
|
||||
}
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Creates a new [`DiscoveryItem`] from a [`NodeData`].
|
||||
</span><span class="kw">pub fn </span>from_node_data(
|
||||
node_id: NodeId,
|
||||
node_data: NodeData,
|
||||
provenance: <span class="kw-2">&</span><span class="lifetime">'static </span>str,
|
||||
last_updated: <span class="prelude-ty">Option</span><u64>,
|
||||
) -> <span class="self">Self </span>{
|
||||
<span class="kw">let </span>node_addr = node_data.into_node_addr(node_id);
|
||||
<span class="self">Self </span>{
|
||||
node_addr,
|
||||
provenance,
|
||||
last_updated,
|
||||
}
|
||||
<span class="doccomment">/// Returns the node id of the discovered node.
|
||||
</span><span class="kw">pub fn </span>node_id(<span class="kw-2">&</span><span class="self">self</span>) -> NodeId {
|
||||
<span class="self">self</span>.node_info.node_id
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Returns the [`NodeInfo`] for the discovered node.
|
||||
</span><span class="kw">pub fn </span>node_info(<span class="kw-2">&</span><span class="self">self</span>) -> <span class="kw-2">&</span>NodeInfo {
|
||||
<span class="kw-2">&</span><span class="self">self</span>.node_info
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Returns the provenance of this discovery item.
|
||||
///
|
||||
/// The provenance is a static string to identify the discovery source.
|
||||
</span><span class="kw">pub fn </span>provenance(<span class="kw-2">&</span><span class="self">self</span>) -> <span class="kw-2">&</span><span class="lifetime">'static </span>str {
|
||||
<span class="kw-2">&</span><span class="self">self</span>.provenance
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Returns the optional timestamp when this node address info was last updated.
|
||||
///
|
||||
/// The value is microseconds since the unix epoch.
|
||||
</span><span class="kw">pub fn </span>last_updated(<span class="kw-2">&</span><span class="self">self</span>) -> <span class="prelude-ty">Option</span><u64> {
|
||||
<span class="self">self</span>.last_updated
|
||||
}
|
||||
|
||||
<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">&</span><span class="self">self</span>) -> NodeAddr {
|
||||
<span class="self">self</span>.node_info.node_addr()
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Converts into a [`NodeAddr`] without cloning.
|
||||
</span><span class="kw">pub fn </span>into_node_addr(<span class="self">self</span>) -> NodeAddr {
|
||||
<span class="self">self</span>.node_info.into_node_addr()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1346,12 +1399,14 @@
|
||||
<span class="kw">loop </span>{
|
||||
<span class="kw">match </span>stream.next().<span class="kw">await </span>{
|
||||
<span class="prelude-val">Some</span>(<span class="prelude-val">Ok</span>(r)) => {
|
||||
<span class="kw">if </span>r.node_addr.is_empty() {
|
||||
<span class="macro">debug!</span>(provenance = %r.provenance, <span class="string">"discovery: empty address found"</span>);
|
||||
<span class="kw">let </span>provenance = r.provenance;
|
||||
<span class="kw">let </span>node_addr = r.into_node_addr();
|
||||
<span class="kw">if </span>node_addr.is_empty() {
|
||||
<span class="macro">debug!</span>(%provenance, <span class="string">"discovery: empty address found"</span>);
|
||||
<span class="kw">continue</span>;
|
||||
}
|
||||
<span class="macro">debug!</span>(provenance = %r.provenance, addr = <span class="question-mark">?</span>r.node_addr, <span class="string">"discovery: new address found"</span>);
|
||||
ep.add_node_addr_with_source(r.node_addr, r.provenance).ok();
|
||||
<span class="macro">debug!</span>(%provenance, addr = <span class="question-mark">?</span>node_addr, <span class="string">"discovery: new address found"</span>);
|
||||
ep.add_node_addr_with_source(node_addr, provenance).ok();
|
||||
<span class="kw">if let </span><span class="prelude-val">Some</span>(tx) = on_first_tx.take() {
|
||||
tx.send(<span class="prelude-val">Ok</span>(())).ok();
|
||||
}
|
||||
@@ -1386,7 +1441,7 @@
|
||||
};
|
||||
|
||||
<span class="kw">use </span>anyhow::Context;
|
||||
<span class="kw">use </span>iroh_base::SecretKey;
|
||||
<span class="kw">use </span>iroh_base::{NodeAddr, SecretKey};
|
||||
<span class="kw">use </span>rand::Rng;
|
||||
<span class="kw">use </span>testresult::TestResult;
|
||||
<span class="kw">use </span>tokio_util::task::AbortOnDropHandle;
|
||||
@@ -1464,7 +1519,8 @@
|
||||
};
|
||||
<span class="kw">let </span>stream = <span class="kw">match </span>addr_info {
|
||||
<span class="prelude-val">Some</span>((data, ts)) => {
|
||||
<span class="kw">let </span>item = DiscoveryItem::from_node_data(node_id, data, <span class="string">"test-disco"</span>, <span class="prelude-val">Some</span>(ts));
|
||||
<span class="kw">let </span>item =
|
||||
DiscoveryItem::new(NodeInfo::new(node_id, data), <span class="string">"test-disco"</span>, <span class="prelude-val">Some</span>(ts));
|
||||
<span class="kw">let </span>delay = <span class="self">self</span>.delay;
|
||||
<span class="kw">let </span>fut = <span class="kw">async move </span>{
|
||||
time::sleep(delay).<span class="kw">await</span>;
|
||||
@@ -1765,7 +1821,7 @@
|
||||
direct_addresses: Default::default(),
|
||||
};
|
||||
|
||||
<span class="macro">assert_eq!</span>(resolved, expected);
|
||||
<span class="macro">assert_eq!</span>(resolved.node_addr(), expected);
|
||||
<span class="prelude-val">Ok</span>(())
|
||||
}
|
||||
|
||||
|
||||
@@ -76,11 +76,7 @@
|
||||
<a href="#75" id="75">75</a>
|
||||
<a href="#76" id="76">76</a>
|
||||
<a href="#77" id="77">77</a>
|
||||
<a href="#78" id="78">78</a>
|
||||
<a href="#79" id="79">79</a>
|
||||
<a href="#80" id="80">80</a>
|
||||
<a href="#81" id="81">81</a>
|
||||
<a href="#82" id="82">82</a></pre></div><pre class="rust"><code><span class="doccomment">//! DNS node discovery for iroh
|
||||
<a href="#78" id="78">78</a></pre></div><pre class="rust"><code><span class="doccomment">//! DNS node discovery for iroh
|
||||
|
||||
</span><span class="kw">use </span>anyhow::Result;
|
||||
<span class="kw">use </span>iroh_base::NodeId;
|
||||
@@ -149,14 +145,10 @@
|
||||
<span class="kw">let </span>resolver = ep.dns_resolver().clone();
|
||||
<span class="kw">let </span>origin_domain = <span class="self">self</span>.origin_domain.clone();
|
||||
<span class="kw">let </span>fut = <span class="kw">async move </span>{
|
||||
<span class="kw">let </span>node_addr = resolver
|
||||
<span class="kw">let </span>node_info = resolver
|
||||
.lookup_node_by_id_staggered(<span class="kw-2">&</span>node_id, <span class="kw-2">&</span>origin_domain, DNS_STAGGERING_MS)
|
||||
.<span class="kw">await</span><span class="question-mark">?</span>;
|
||||
<span class="prelude-val">Ok</span>(DiscoveryItem {
|
||||
node_addr,
|
||||
provenance: <span class="string">"dns"</span>,
|
||||
last_updated: <span class="prelude-val">None</span>,
|
||||
})
|
||||
<span class="prelude-val">Ok</span>(DiscoveryItem::new(node_info, <span class="string">"dns"</span>, <span class="prelude-val">None</span>))
|
||||
};
|
||||
<span class="kw">let </span>stream = n0_future::stream::once_future(fut);
|
||||
<span class="prelude-val">Some</span>(Box::pin(stream))
|
||||
|
||||
@@ -476,27 +476,7 @@
|
||||
<a href="#475" id="475">475</a>
|
||||
<a href="#476" id="476">476</a>
|
||||
<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></pre></div><pre class="rust"><code><span class="doccomment">//! A discovery service that uses an mdns-like service to discover local nodes.
|
||||
<a href="#478" id="478">478</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.
|
||||
@@ -535,7 +515,7 @@
|
||||
|
||||
<span class="kw">use </span>anyhow::Result;
|
||||
<span class="kw">use </span>derive_more::FromStr;
|
||||
<span class="kw">use </span>iroh_base::{NodeAddr, NodeId, PublicKey, RelayUrl};
|
||||
<span class="kw">use </span>iroh_base::{NodeId, PublicKey};
|
||||
<span class="kw">use </span>n0_future::{
|
||||
boxed::BoxStream,
|
||||
task::{<span class="self">self</span>, AbortOnDropHandle, JoinSet},
|
||||
@@ -546,7 +526,7 @@
|
||||
<span class="kw">use </span>tracing::{debug, error, info_span, trace, warn, Instrument};
|
||||
|
||||
<span class="kw">use crate</span>::{
|
||||
discovery::{Discovery, DiscoveryItem, NodeData},
|
||||
discovery::{Discovery, DiscoveryItem, NodeData, NodeInfo},
|
||||
watchable::Watchable,
|
||||
Endpoint,
|
||||
};
|
||||
@@ -571,7 +551,7 @@
|
||||
</span>handle: AbortOnDropHandle<()>,
|
||||
sender: mpsc::Sender<Message>,
|
||||
<span class="doccomment">/// When `local_addrs` changes, we re-publish our info.
|
||||
</span>local_addrs: Watchable<<span class="prelude-ty">Option</span><(<span class="prelude-ty">Option</span><RelayUrl>, BTreeSet<SocketAddr>)>>,
|
||||
</span>local_addrs: Watchable<<span class="prelude-ty">Option</span><NodeData>>,
|
||||
}
|
||||
|
||||
<span class="attr">#[derive(Debug)]
|
||||
@@ -644,8 +624,7 @@
|
||||
<span class="kw-2">&</span>rt,
|
||||
)<span class="question-mark">?</span>;
|
||||
|
||||
<span class="kw">let </span>local_addrs: Watchable<<span class="prelude-ty">Option</span><(<span class="prelude-ty">Option</span><RelayUrl>, BTreeSet<SocketAddr>)>> =
|
||||
Watchable::default();
|
||||
<span class="kw">let </span>local_addrs: Watchable<<span class="prelude-ty">Option</span><NodeData>> = Watchable::default();
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>addrs_change = local_addrs.watch();
|
||||
<span class="kw">let </span>discovery_fut = <span class="kw">async move </span>{
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>node_addrs: HashMap<PublicKey, Peer> = HashMap::default();
|
||||
@@ -662,11 +641,11 @@
|
||||
msg = recv.recv() => {
|
||||
msg
|
||||
}
|
||||
<span class="prelude-val">Ok</span>(<span class="prelude-val">Some</span>((_url, addrs))) = addrs_change.updated() => {
|
||||
<span class="macro">tracing::trace!</span>(<span class="question-mark">?</span>addrs, <span class="string">"LocalSwarmDiscovery address changed"</span>);
|
||||
<span class="prelude-val">Ok</span>(<span class="prelude-val">Some</span>(data)) = addrs_change.updated() => {
|
||||
<span class="macro">tracing::trace!</span>(<span class="question-mark">?</span>data, <span class="string">"LocalSwarmDiscovery address changed"</span>);
|
||||
discovery.remove_all();
|
||||
<span class="kw">let </span>addrs =
|
||||
LocalSwarmDiscovery::socketaddrs_to_addrs(addrs);
|
||||
LocalSwarmDiscovery::socketaddrs_to_addrs(data.direct_addresses());
|
||||
<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>)
|
||||
}
|
||||
@@ -816,7 +795,7 @@
|
||||
sender.send(Message::Discovery(node_id, peer)).<span class="kw">await</span>.ok();
|
||||
});
|
||||
};
|
||||
<span class="kw">let </span>addrs = LocalSwarmDiscovery::socketaddrs_to_addrs(socketaddrs);
|
||||
<span class="kw">let </span>addrs = LocalSwarmDiscovery::socketaddrs_to_addrs(<span class="kw-2">&</span>socketaddrs);
|
||||
<span class="kw">let </span>node_id_str = data_encoding::BASE32_NOPAD
|
||||
.encode(node_id.as_bytes())
|
||||
.to_ascii_lowercase();
|
||||
@@ -829,7 +808,7 @@
|
||||
discoverer.spawn(rt)
|
||||
}
|
||||
|
||||
<span class="kw">fn </span>socketaddrs_to_addrs(socketaddrs: BTreeSet<SocketAddr>) -> HashMap<u16, Vec<IpAddr>> {
|
||||
<span class="kw">fn </span>socketaddrs_to_addrs(socketaddrs: <span class="kw-2">&</span>BTreeSet<SocketAddr>) -> HashMap<u16, Vec<IpAddr>> {
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>addrs: HashMap<u16, Vec<IpAddr>> = HashMap::default();
|
||||
<span class="kw">for </span>socketaddr <span class="kw">in </span>socketaddrs {
|
||||
addrs
|
||||
@@ -847,15 +826,9 @@
|
||||
.iter()
|
||||
.map(|(ip, port)| SocketAddr::new(<span class="kw-2">*</span>ip, <span class="kw-2">*</span>port))
|
||||
.collect();
|
||||
DiscoveryItem {
|
||||
node_addr: NodeAddr {
|
||||
node_id: <span class="kw-2">*</span>node_id,
|
||||
relay_url: <span class="prelude-val">None</span>,
|
||||
direct_addresses,
|
||||
},
|
||||
provenance: NAME,
|
||||
last_updated: <span class="prelude-val">None</span>,
|
||||
}
|
||||
<span class="kw">let </span>node_data = NodeData::new(<span class="prelude-val">None</span>, direct_addresses);
|
||||
<span class="kw">let </span>node_info = NodeInfo::new(<span class="kw-2">*</span>node_id, node_data);
|
||||
DiscoveryItem::new(node_info, NAME, <span class="prelude-val">None</span>)
|
||||
}
|
||||
|
||||
<span class="kw">impl </span>Discovery <span class="kw">for </span>LocalSwarmDiscovery {
|
||||
@@ -875,12 +848,7 @@
|
||||
}
|
||||
|
||||
<span class="kw">fn </span>publish(<span class="kw-2">&</span><span class="self">self</span>, data: <span class="kw-2">&</span>NodeData) {
|
||||
<span class="self">self</span>.local_addrs
|
||||
.set(<span class="prelude-val">Some</span>((
|
||||
data.relay_url.clone(),
|
||||
data.direct_addresses.clone(),
|
||||
)))
|
||||
.ok();
|
||||
<span class="self">self</span>.local_addrs.set(<span class="prelude-val">Some</span>(data.clone())).ok();
|
||||
}
|
||||
|
||||
<span class="kw">fn </span>subscribe(<span class="kw-2">&</span><span class="self">self</span>) -> <span class="prelude-ty">Option</span><BoxStream<DiscoveryItem>> {
|
||||
@@ -934,16 +902,8 @@
|
||||
<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_addr.relay_url, addr_info.relay_url);
|
||||
<span class="macro">assert_eq!</span>(
|
||||
s1_res.node_addr.direct_addresses,
|
||||
addr_info.direct_addresses
|
||||
);
|
||||
<span class="macro">assert_eq!</span>(s2_res.node_addr.relay_url, addr_info.relay_url);
|
||||
<span class="macro">assert_eq!</span>(
|
||||
s2_res.node_addr.direct_addresses,
|
||||
addr_info.direct_addresses
|
||||
);
|
||||
<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="prelude-val">Ok</span>(())
|
||||
}
|
||||
@@ -971,8 +931,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">&</span>item.node_addr.node_id) {
|
||||
got_ids.insert(item.node_addr.node_id);
|
||||
<span class="kw">if </span>node_ids.contains(<span class="kw-2">&</span>item.node_id()) {
|
||||
got_ids.insert(item.node_id());
|
||||
}
|
||||
} <span class="kw">else </span>{
|
||||
<span class="macro">anyhow::bail!</span>(
|
||||
|
||||
@@ -595,7 +595,7 @@
|
||||
/// This is a nonblocking function, the actual update is performed in the background.
|
||||
</span><span class="kw">pub fn </span>update_addr_info(<span class="kw-2">&</span><span class="self">self</span>, data: <span class="kw-2">&</span>NodeData) {
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>data = data.clone();
|
||||
<span class="kw">if </span>data.relay_url.is_some() {
|
||||
<span class="kw">if </span>data.relay_url().is_some() {
|
||||
<span class="comment">// If relay url is set: only publish relay url, and no direct addrs.
|
||||
</span>data.clear_direct_addresses();
|
||||
}
|
||||
@@ -727,7 +727,7 @@
|
||||
<span class="kw">let </span>fut = <span class="kw">async move </span>{
|
||||
<span class="kw">let </span>signed_packet = pkarr_client.resolve(node_id).<span class="kw">await</span><span class="question-mark">?</span>;
|
||||
<span class="kw">let </span>info = NodeInfo::from_pkarr_signed_packet(<span class="kw-2">&</span>signed_packet)<span class="question-mark">?</span>;
|
||||
<span class="kw">let </span>item = DiscoveryItem::from_node_info(info, <span class="string">"pkarr"</span>, <span class="prelude-val">None</span>);
|
||||
<span class="kw">let </span>item = DiscoveryItem::new(info, <span class="string">"pkarr"</span>, <span class="prelude-val">None</span>);
|
||||
<span class="prelude-val">Ok</span>(item)
|
||||
};
|
||||
<span class="kw">let </span>stream = n0_future::stream::once_future(fut);
|
||||
|
||||
@@ -445,15 +445,7 @@
|
||||
<a href="#444" id="444">444</a>
|
||||
<a href="#445" id="445">445</a>
|
||||
<a href="#446" id="446">446</a>
|
||||
<a href="#447" id="447">447</a>
|
||||
<a href="#448" id="448">448</a>
|
||||
<a href="#449" id="449">449</a>
|
||||
<a href="#450" id="450">450</a>
|
||||
<a href="#451" id="451">451</a>
|
||||
<a href="#452" id="452">452</a>
|
||||
<a href="#453" id="453">453</a>
|
||||
<a href="#454" id="454">454</a>
|
||||
<a href="#455" id="455">455</a></pre></div><pre class="rust"><code><span class="doccomment">//! Pkarr based node discovery for iroh, supporting both relay servers and the DHT.
|
||||
<a href="#447" id="447">447</a></pre></div><pre class="rust"><code><span class="doccomment">//! Pkarr based node discovery for iroh, supporting both relay servers and the DHT.
|
||||
//!
|
||||
//! This module contains pkarr-based node discovery for iroh which can use both pkarr
|
||||
//! relay servers as well as the Mainline DHT directly. See the [pkarr module] for an
|
||||
@@ -463,7 +455,7 @@
|
||||
</span><span class="kw">use </span>std::sync::{Arc, Mutex};
|
||||
|
||||
<span class="kw">use </span>anyhow::Result;
|
||||
<span class="kw">use </span>iroh_base::{NodeAddr, NodeId, SecretKey};
|
||||
<span class="kw">use </span>iroh_base::{NodeId, SecretKey};
|
||||
<span class="kw">use </span>n0_future::{
|
||||
boxed::BoxStream,
|
||||
stream::StreamExt,
|
||||
@@ -557,14 +549,8 @@
|
||||
<span class="kw">match </span>maybe_packet {
|
||||
<span class="prelude-val">Ok</span>(<span class="prelude-val">Some</span>(signed_packet)) => <span class="kw">match </span>NodeInfo::from_pkarr_signed_packet(<span class="kw-2">&</span>signed_packet) {
|
||||
<span class="prelude-val">Ok</span>(node_info) => {
|
||||
<span class="kw">let </span>node_addr: NodeAddr = node_info.into();
|
||||
|
||||
<span class="macro">tracing::info!</span>(<span class="string">"discovered node info from relay {:?}"</span>, node_addr);
|
||||
<span class="prelude-val">Some</span>(<span class="prelude-val">Ok</span>(DiscoveryItem {
|
||||
node_addr,
|
||||
provenance: <span class="string">"relay"</span>,
|
||||
last_updated: <span class="prelude-val">None</span>,
|
||||
}))
|
||||
<span class="macro">tracing::info!</span>(<span class="string">"discovered node info from relay {:?}"</span>, node_info);
|
||||
<span class="prelude-val">Some</span>(<span class="prelude-val">Ok</span>(DiscoveryItem::new(node_info, <span class="string">"relay"</span>, <span class="prelude-val">None</span>)))
|
||||
}
|
||||
<span class="prelude-val">Err</span>(_err) => {
|
||||
<span class="macro">tracing::debug!</span>(<span class="string">"failed to parse signed packet as node info"</span>);
|
||||
@@ -589,9 +575,7 @@
|
||||
<span class="prelude-val">Ok</span>(<span class="prelude-val">Some</span>(signed_packet)) => <span class="kw">match </span>NodeInfo::from_pkarr_signed_packet(<span class="kw-2">&</span>signed_packet) {
|
||||
<span class="prelude-val">Ok</span>(node_info) => {
|
||||
<span class="macro">tracing::info!</span>(<span class="string">"discovered node info from DHT {:?}"</span>, <span class="kw-2">&</span>node_info);
|
||||
<span class="prelude-val">Some</span>(<span class="prelude-val">Ok</span>(DiscoveryItem::from_node_info(
|
||||
node_info, <span class="string">"mainline"</span>, <span class="prelude-val">None</span>,
|
||||
)))
|
||||
<span class="prelude-val">Some</span>(<span class="prelude-val">Ok</span>(DiscoveryItem::new(node_info, <span class="string">"mainline"</span>, <span class="prelude-val">None</span>)))
|
||||
}
|
||||
<span class="prelude-val">Err</span>(_err) => {
|
||||
<span class="macro">tracing::debug!</span>(<span class="string">"failed to parse signed packet as node info"</span>);
|
||||
@@ -894,8 +878,8 @@
|
||||
.collect::<Vec<<span class="kw">_</span>>>()
|
||||
.<span class="kw">await</span>;
|
||||
<span class="kw">for </span>item <span class="kw">in </span>items.into_iter().flatten() {
|
||||
<span class="kw">if let </span><span class="prelude-val">Some</span>(url) = item.node_addr.relay_url {
|
||||
found_relay_urls.insert(url);
|
||||
<span class="kw">if let </span><span class="prelude-val">Some</span>(url) = item.relay_url() {
|
||||
found_relay_urls.insert(url.clone());
|
||||
}
|
||||
}
|
||||
<span class="kw">if </span>found_relay_urls.contains(<span class="kw-2">&</span>relay_url) {
|
||||
|
||||
@@ -255,9 +255,7 @@
|
||||
<a href="#254" id="254">254</a>
|
||||
<a href="#255" id="255">255</a>
|
||||
<a href="#256" id="256">256</a>
|
||||
<a href="#257" id="257">257</a>
|
||||
<a href="#258" id="258">258</a>
|
||||
<a href="#259" id="259">259</a></pre></div><pre class="rust"><code><span class="doccomment">//! A static node discovery to manually add node addressing information.
|
||||
<a href="#257" id="257">257</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.
|
||||
@@ -280,7 +278,7 @@
|
||||
time::SystemTime,
|
||||
};
|
||||
|
||||
<span class="kw">use super</span>::{Discovery, DiscoveryItem, NodeData};
|
||||
<span class="kw">use super</span>::{Discovery, DiscoveryItem, NodeData, NodeInfo};
|
||||
|
||||
<span class="doccomment">/// A static node discovery to manually add node addressing information.
|
||||
///
|
||||
@@ -327,11 +325,11 @@
|
||||
</span><span class="attr">#[derive(Debug, Default, Clone)]
|
||||
#[repr(transparent)]
|
||||
</span><span class="kw">pub struct </span>StaticProvider {
|
||||
nodes: Arc<RwLock<BTreeMap<NodeId, NodeInfo>>>,
|
||||
nodes: Arc<RwLock<BTreeMap<NodeId, StoredNodeInfo>>>,
|
||||
}
|
||||
|
||||
<span class="attr">#[derive(Debug)]
|
||||
</span><span class="kw">struct </span>NodeInfo {
|
||||
</span><span class="kw">struct </span>StoredNodeInfo {
|
||||
data: NodeData,
|
||||
last_updated: SystemTime,
|
||||
}
|
||||
@@ -394,8 +392,8 @@
|
||||
<span class="kw">let </span>node_id = node_addr.node_id;
|
||||
<span class="kw">let </span>data: NodeData = node_addr.into();
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>guard = <span class="self">self</span>.nodes.write().expect(<span class="string">"poisoned"</span>);
|
||||
<span class="kw">let </span>previous = guard.insert(node_id, NodeInfo { data, last_updated });
|
||||
previous.map(|x| x.data.into_node_addr(node_id))
|
||||
<span class="kw">let </span>previous = guard.insert(node_id, StoredNodeInfo { data, last_updated });
|
||||
previous.map(|x| NodeInfo::new(node_id, x.data).into_node_addr())
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Augments node addressing information for the given node ID.
|
||||
@@ -412,13 +410,12 @@
|
||||
<span class="kw">let </span>existing = entry.get_mut();
|
||||
existing
|
||||
.data
|
||||
.direct_addresses
|
||||
.extend(node_addr.direct_addresses);
|
||||
existing.data.relay_url = node_addr.relay_url;
|
||||
.add_direct_addresses(node_addr.direct_addresses);
|
||||
existing.data.set_relay_url(node_addr.relay_url);
|
||||
existing.last_updated = last_updated;
|
||||
}
|
||||
Entry::Vacant(entry) => {
|
||||
entry.insert(NodeInfo {
|
||||
entry.insert(StoredNodeInfo {
|
||||
data: NodeData::from(node_addr),
|
||||
last_updated,
|
||||
});
|
||||
@@ -430,7 +427,7 @@
|
||||
</span><span class="kw">pub fn </span>get_node_addr(<span class="kw-2">&</span><span class="self">self</span>, node_id: NodeId) -> <span class="prelude-ty">Option</span><NodeAddr> {
|
||||
<span class="kw">let </span>guard = <span class="self">self</span>.nodes.read().expect(<span class="string">"poisoned"</span>);
|
||||
<span class="kw">let </span>info = guard.get(<span class="kw-2">&</span>node_id)<span class="question-mark">?</span>;
|
||||
<span class="prelude-val">Some</span>(info.data.clone().into_node_addr(node_id))
|
||||
<span class="prelude-val">Some</span>(NodeInfo::new(node_id, info.data.clone()).into_node_addr())
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Removes all node addressing information for the given node ID.
|
||||
@@ -439,7 +436,7 @@
|
||||
</span><span class="kw">pub fn </span>remove_node_addr(<span class="kw-2">&</span><span class="self">self</span>, node_id: NodeId) -> <span class="prelude-ty">Option</span><NodeAddr> {
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>guard = <span class="self">self</span>.nodes.write().expect(<span class="string">"poisoned"</span>);
|
||||
<span class="kw">let </span>info = guard.remove(<span class="kw-2">&</span>node_id)<span class="question-mark">?</span>;
|
||||
<span class="prelude-val">Some</span>(info.data.into_node_addr(node_id))
|
||||
<span class="prelude-val">Some</span>(NodeInfo::new(node_id, info.data).into_node_addr())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -460,9 +457,8 @@
|
||||
.duration_since(SystemTime::UNIX_EPOCH)
|
||||
.expect(<span class="string">"time drift"</span>)
|
||||
.as_micros() <span class="kw">as </span>u64;
|
||||
<span class="kw">let </span>item = DiscoveryItem::from_node_data(
|
||||
node_id,
|
||||
node_info.data.clone(),
|
||||
<span class="kw">let </span>item = DiscoveryItem::new(
|
||||
NodeInfo::new(node_id, node_info.data.clone()),
|
||||
<span class="self">Self</span>::PROVENANCE,
|
||||
<span class="prelude-val">Some</span>(last_updated),
|
||||
);
|
||||
|
||||
@@ -4411,7 +4411,9 @@
|
||||
<a href="#4410" id="4410">4410</a>
|
||||
<a href="#4411" id="4411">4411</a>
|
||||
<a href="#4412" id="4412">4412</a>
|
||||
<a href="#4413" id="4413">4413</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="#4413" id="4413">4413</a>
|
||||
<a href="#4414" id="4414">4414</a>
|
||||
<a href="#4415" id="4415">4415</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
|
||||
//!
|
||||
@@ -6739,12 +6741,14 @@
|
||||
// forever like we do with the other branches that yield `Option`s
|
||||
</span><span class="prelude-val">Some</span>(discovery_item) = discovery_events.next() => {
|
||||
<span class="macro">trace!</span>(<span class="string">"tick: discovery event, address discovered: {discovery_item:?}"</span>);
|
||||
<span class="kw">let </span>provenance = discovery_item.provenance();
|
||||
<span class="kw">let </span>node_addr = discovery_item.into_node_addr();
|
||||
<span class="kw">if let </span><span class="prelude-val">Err</span>(e) = <span class="self">self</span>.msock.add_node_addr(
|
||||
discovery_item.node_addr.clone(),
|
||||
node_addr.clone(),
|
||||
Source::Discovery {
|
||||
name: discovery_item.provenance.into()
|
||||
name: provenance.to_string()
|
||||
}) {
|
||||
<span class="macro">warn!</span>(<span class="question-mark">?</span>discovery_item.node_addr, <span class="string">"unable to add discovered node address to the node map: {e:?}"</span>);
|
||||
<span class="macro">warn!</span>(<span class="question-mark">?</span>node_addr, <span class="string">"unable to add discovered node address to the node map: {e:?}"</span>);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -303,7 +303,7 @@
|
||||
<span class="kw">use </span>iroh::{
|
||||
discovery::{pkarr::PkarrRelayClient, NodeData},
|
||||
dns::{node_info::NodeInfo, DnsResolver},
|
||||
SecretKey,
|
||||
RelayUrl, SecretKey,
|
||||
};
|
||||
<span class="kw">use </span>pkarr::{PkarrClient, SignedPacket};
|
||||
<span class="kw">use </span>testresult::TestResult;
|
||||
@@ -449,7 +449,7 @@
|
||||
<span class="kw">let </span>secret_key = SecretKey::generate(rand::thread_rng());
|
||||
<span class="kw">let </span>node_id = secret_key.public();
|
||||
<span class="kw">let </span>pkarr = PkarrRelayClient::new(pkarr_relay);
|
||||
<span class="kw">let </span>relay_url: Url = <span class="string">"https://relay.example."</span>.parse()<span class="question-mark">?</span>;
|
||||
<span class="kw">let </span>relay_url: RelayUrl = <span class="string">"https://relay.example."</span>.parse()<span class="question-mark">?</span>;
|
||||
<span class="kw">let </span>node_data = NodeData::default().with_relay_url(relay_url.clone());
|
||||
<span class="kw">let </span>node_info = NodeInfo::new(node_id, node_data);
|
||||
<span class="kw">let </span>signed_packet = node_info.to_pkarr_signed_packet(<span class="kw-2">&</span>secret_key, <span class="number">30</span>)<span class="question-mark">?</span>;
|
||||
@@ -460,7 +460,7 @@
|
||||
<span class="kw">let </span>res = resolver.lookup_node_by_id(<span class="kw-2">&</span>node_id, origin).<span class="kw">await</span><span class="question-mark">?</span>;
|
||||
|
||||
<span class="macro">assert_eq!</span>(res.node_id, node_id);
|
||||
<span class="macro">assert_eq!</span>(res.relay_url.map(Url::from), <span class="prelude-val">Some</span>(relay_url));
|
||||
<span class="macro">assert_eq!</span>(res.relay_url(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span>relay_url));
|
||||
|
||||
server.shutdown().<span class="kw">await</span><span class="question-mark">?</span>;
|
||||
<span class="prelude-val">Ok</span>(())
|
||||
@@ -513,7 +513,7 @@
|
||||
<span class="comment">// create a signed packet
|
||||
</span><span class="kw">let </span>secret_key = SecretKey::generate(rand::thread_rng());
|
||||
<span class="kw">let </span>node_id = secret_key.public();
|
||||
<span class="kw">let </span>relay_url: Url = <span class="string">"https://relay.example."</span>.parse()<span class="question-mark">?</span>;
|
||||
<span class="kw">let </span>relay_url: RelayUrl = <span class="string">"https://relay.example."</span>.parse()<span class="question-mark">?</span>;
|
||||
<span class="kw">let </span>node_data = NodeData::default().with_relay_url(relay_url.clone());
|
||||
<span class="kw">let </span>node_info = NodeInfo::new(node_id, node_data);
|
||||
<span class="kw">let </span>signed_packet = node_info.to_pkarr_signed_packet(<span class="kw-2">&</span>secret_key, <span class="number">30</span>)<span class="question-mark">?</span>;
|
||||
@@ -532,7 +532,7 @@
|
||||
<span class="kw">let </span>res = resolver.lookup_node_by_id(<span class="kw-2">&</span>node_id, origin).<span class="kw">await</span><span class="question-mark">?</span>;
|
||||
|
||||
<span class="macro">assert_eq!</span>(res.node_id, node_id);
|
||||
<span class="macro">assert_eq!</span>(res.relay_url.map(Url::from), <span class="prelude-val">Some</span>(relay_url));
|
||||
<span class="macro">assert_eq!</span>(res.relay_url(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span>relay_url));
|
||||
|
||||
server.shutdown().<span class="kw">await</span><span class="question-mark">?</span>;
|
||||
<span class="kw">for </span><span class="kw-2">mut </span>node <span class="kw">in </span>testnet.nodes {
|
||||
|
||||
@@ -407,7 +407,8 @@
|
||||
<a href="#406" id="406">406</a>
|
||||
<a href="#407" id="407">407</a>
|
||||
<a href="#408" id="408">408</a>
|
||||
<a href="#409" id="409">409</a></pre></div><pre class="rust"><code><span class="doccomment">//! DNS resolver
|
||||
<a href="#409" id="409">409</a>
|
||||
<a href="#410" id="410">410</a></pre></div><pre class="rust"><code><span class="doccomment">//! DNS resolver
|
||||
|
||||
</span><span class="kw">use </span>std::{
|
||||
fmt::{<span class="self">self</span>, Write},
|
||||
@@ -417,11 +418,12 @@
|
||||
|
||||
<span class="kw">use </span>anyhow::{bail, Context, <span class="prelude-ty">Result</span>};
|
||||
<span class="kw">use </span>hickory_resolver::{Resolver, TokioResolver};
|
||||
<span class="kw">use </span>iroh_base::{NodeAddr, NodeId};
|
||||
<span class="kw">use </span>iroh_base::NodeId;
|
||||
<span class="kw">use </span>n0_future::{
|
||||
time::{<span class="self">self</span>, Duration},
|
||||
StreamExt,
|
||||
};
|
||||
<span class="kw">use </span>node_info::NodeInfo;
|
||||
<span class="kw">use </span>url::Url;
|
||||
|
||||
<span class="kw">pub mod </span>node_info;
|
||||
@@ -624,18 +626,18 @@
|
||||
///
|
||||
/// To lookup nodes that published their node info to the DNS servers run by n0,
|
||||
/// pass [`N0_DNS_NODE_ORIGIN_PROD`] as `origin`.
|
||||
</span><span class="kw">pub async fn </span>lookup_node_by_id(<span class="kw-2">&</span><span class="self">self</span>, node_id: <span class="kw-2">&</span>NodeId, origin: <span class="kw-2">&</span>str) -> <span class="prelude-ty">Result</span><NodeAddr> {
|
||||
</span><span class="kw">pub async fn </span>lookup_node_by_id(<span class="kw-2">&</span><span class="self">self</span>, node_id: <span class="kw-2">&</span>NodeId, origin: <span class="kw-2">&</span>str) -> <span class="prelude-ty">Result</span><NodeInfo> {
|
||||
<span class="kw">let </span>attrs =
|
||||
node_info::TxtAttrs::<node_info::IrohAttr>::lookup_by_id(<span class="self">self</span>, node_id, origin).<span class="kw">await</span><span class="question-mark">?</span>;
|
||||
<span class="kw">let </span>info: node_info::NodeInfo = attrs.into();
|
||||
<span class="prelude-val">Ok</span>(info.into())
|
||||
<span class="kw">let </span>info = attrs.into();
|
||||
<span class="prelude-val">Ok</span>(info)
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Looks up node info by DNS name.
|
||||
</span><span class="kw">pub async fn </span>lookup_node_by_domain_name(<span class="kw-2">&</span><span class="self">self</span>, name: <span class="kw-2">&</span>str) -> <span class="prelude-ty">Result</span><NodeAddr> {
|
||||
</span><span class="kw">pub async fn </span>lookup_node_by_domain_name(<span class="kw-2">&</span><span class="self">self</span>, name: <span class="kw-2">&</span>str) -> <span class="prelude-ty">Result</span><NodeInfo> {
|
||||
<span class="kw">let </span>attrs = node_info::TxtAttrs::<node_info::IrohAttr>::lookup_by_name(<span class="self">self</span>, name).<span class="kw">await</span><span class="question-mark">?</span>;
|
||||
<span class="kw">let </span>info: node_info::NodeInfo = attrs.into();
|
||||
<span class="prelude-val">Ok</span>(info.into())
|
||||
<span class="kw">let </span>info = attrs.into();
|
||||
<span class="prelude-val">Ok</span>(info)
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Looks up node info by DNS name in a staggered fashion.
|
||||
@@ -648,7 +650,7 @@
|
||||
<span class="kw-2">&</span><span class="self">self</span>,
|
||||
name: <span class="kw-2">&</span>str,
|
||||
delays_ms: <span class="kw-2">&</span>[u64],
|
||||
) -> <span class="prelude-ty">Result</span><NodeAddr> {
|
||||
) -> <span class="prelude-ty">Result</span><NodeInfo> {
|
||||
<span class="kw">let </span>f = || <span class="self">self</span>.lookup_node_by_domain_name(name);
|
||||
stagger_call(f, delays_ms).<span class="kw">await
|
||||
</span>}
|
||||
@@ -664,7 +666,7 @@
|
||||
node_id: <span class="kw-2">&</span>NodeId,
|
||||
origin: <span class="kw-2">&</span>str,
|
||||
delays_ms: <span class="kw-2">&</span>[u64],
|
||||
) -> <span class="prelude-ty">Result</span><NodeAddr> {
|
||||
) -> <span class="prelude-ty">Result</span><NodeInfo> {
|
||||
<span class="kw">let </span>f = || <span class="self">self</span>.lookup_node_by_id(node_id, origin);
|
||||
stagger_call(f, delays_ms).<span class="kw">await
|
||||
</span>}
|
||||
|
||||
@@ -584,7 +584,54 @@
|
||||
<a href="#583" id="583">583</a>
|
||||
<a href="#584" id="584">584</a>
|
||||
<a href="#585" id="585">585</a>
|
||||
<a href="#586" id="586">586</a></pre></div><pre class="rust"><code><span class="doccomment">//! Support for handling DNS resource records for dialing by [`NodeId`].
|
||||
<a href="#586" id="586">586</a>
|
||||
<a href="#587" id="587">587</a>
|
||||
<a href="#588" id="588">588</a>
|
||||
<a href="#589" id="589">589</a>
|
||||
<a href="#590" id="590">590</a>
|
||||
<a href="#591" id="591">591</a>
|
||||
<a href="#592" id="592">592</a>
|
||||
<a href="#593" id="593">593</a>
|
||||
<a href="#594" id="594">594</a>
|
||||
<a href="#595" id="595">595</a>
|
||||
<a href="#596" id="596">596</a>
|
||||
<a href="#597" id="597">597</a>
|
||||
<a href="#598" id="598">598</a>
|
||||
<a href="#599" id="599">599</a>
|
||||
<a href="#600" id="600">600</a>
|
||||
<a href="#601" id="601">601</a>
|
||||
<a href="#602" id="602">602</a>
|
||||
<a href="#603" id="603">603</a>
|
||||
<a href="#604" id="604">604</a>
|
||||
<a href="#605" id="605">605</a>
|
||||
<a href="#606" id="606">606</a>
|
||||
<a href="#607" id="607">607</a>
|
||||
<a href="#608" id="608">608</a>
|
||||
<a href="#609" id="609">609</a>
|
||||
<a href="#610" id="610">610</a>
|
||||
<a href="#611" id="611">611</a>
|
||||
<a href="#612" id="612">612</a>
|
||||
<a href="#613" id="613">613</a>
|
||||
<a href="#614" id="614">614</a>
|
||||
<a href="#615" id="615">615</a>
|
||||
<a href="#616" id="616">616</a>
|
||||
<a href="#617" id="617">617</a>
|
||||
<a href="#618" id="618">618</a>
|
||||
<a href="#619" id="619">619</a>
|
||||
<a href="#620" id="620">620</a>
|
||||
<a href="#621" id="621">621</a>
|
||||
<a href="#622" id="622">622</a>
|
||||
<a href="#623" id="623">623</a>
|
||||
<a href="#624" id="624">624</a>
|
||||
<a href="#625" id="625">625</a>
|
||||
<a href="#626" id="626">626</a>
|
||||
<a href="#627" id="627">627</a>
|
||||
<a href="#628" id="628">628</a>
|
||||
<a href="#629" id="629">629</a>
|
||||
<a href="#630" id="630">630</a>
|
||||
<a href="#631" id="631">631</a>
|
||||
<a href="#632" id="632">632</a>
|
||||
<a href="#633" id="633">633</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.
|
||||
@@ -664,19 +711,18 @@
|
||||
}
|
||||
}
|
||||
|
||||
<span class="doccomment">/// The information that can be published about a node in discovery services.
|
||||
<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.
|
||||
///
|
||||
/// The fields are not public, but there are setter and getter functions for all fields
|
||||
/// contained in the struct.
|
||||
/// 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`].
|
||||
</span><span class="attr">#[derive(Debug, Clone, Default, Eq, PartialEq)]
|
||||
#[non_exhaustive]
|
||||
</span><span class="kw">pub struct </span>NodeData {
|
||||
<span class="doccomment">/// URL of the home relay of this node.
|
||||
</span><span class="kw">pub </span>relay_url: <span class="prelude-ty">Option</span><RelayUrl>,
|
||||
</span>relay_url: <span class="prelude-ty">Option</span><RelayUrl>,
|
||||
<span class="doccomment">/// Direct addresses where this node can be reached.
|
||||
</span><span class="kw">pub </span>direct_addresses: BTreeSet<SocketAddr>,
|
||||
</span>direct_addresses: BTreeSet<SocketAddr>,
|
||||
}
|
||||
|
||||
<span class="kw">impl </span>NodeData {
|
||||
@@ -688,30 +734,41 @@
|
||||
}
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Sets the relay URL.
|
||||
<span class="doccomment">/// Sets the relay URL and returns the updated node data.
|
||||
</span><span class="kw">pub fn </span>with_relay_url(<span class="kw-2">mut </span><span class="self">self</span>, relay_url: <span class="kw">impl </span>Into<RelayUrl>) -> <span class="self">Self </span>{
|
||||
<span class="self">self</span>.relay_url = <span class="prelude-val">Some</span>(relay_url.into());
|
||||
<span class="self">self
|
||||
</span>}
|
||||
|
||||
<span class="doccomment">/// Sets the direct addresses.
|
||||
<span class="doccomment">/// Sets the direct addresses and returns the updated node data.
|
||||
</span><span class="kw">pub fn </span>with_direct_addrs(<span class="kw-2">mut </span><span class="self">self</span>, direct_addrs: BTreeSet<SocketAddr>) -> <span class="self">Self </span>{
|
||||
<span class="self">self</span>.direct_addresses = direct_addrs;
|
||||
<span class="self">self
|
||||
</span>}
|
||||
|
||||
<span class="doccomment">/// Removes all direct addresses.
|
||||
<span class="doccomment">/// Returns the relay URL of the node.
|
||||
</span><span class="kw">pub fn </span>relay_url(<span class="kw-2">&</span><span class="self">self</span>) -> <span class="prelude-ty">Option</span><<span class="kw-2">&</span>RelayUrl> {
|
||||
<span class="self">self</span>.relay_url.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">&</span><span class="self">self</span>) -> <span class="kw-2">&</span>BTreeSet<SocketAddr> {
|
||||
<span class="kw-2">&</span><span class="self">self</span>.direct_addresses
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Removes all direct addresses from the node data.
|
||||
</span><span class="kw">pub fn </span>clear_direct_addresses(<span class="kw-2">&mut </span><span class="self">self</span>) {
|
||||
<span class="self">self</span>.direct_addresses = Default::default();
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Converts into a [`NodeAddr`].
|
||||
</span><span class="kw">pub fn </span>into_node_addr(<span class="self">self</span>, node_id: NodeId) -> NodeAddr {
|
||||
NodeAddr {
|
||||
node_id,
|
||||
relay_url: <span class="self">self</span>.relay_url,
|
||||
direct_addresses: <span class="self">self</span>.direct_addresses,
|
||||
}
|
||||
<span class="doccomment">/// Adds direct addresses to the node data.
|
||||
</span><span class="kw">pub fn </span>add_direct_addresses(<span class="kw-2">&mut </span><span class="self">self</span>, addrs: <span class="kw">impl </span>IntoIterator<Item = SocketAddr>) {
|
||||
<span class="self">self</span>.direct_addresses.extend(addrs.into_iter())
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Sets the relay URL of the node data.
|
||||
</span><span class="kw">pub fn </span>set_relay_url(<span class="kw-2">&mut </span><span class="self">self</span>, relay_url: <span class="prelude-ty">Option</span><RelayUrl>) {
|
||||
<span class="self">self</span>.relay_url = relay_url
|
||||
}
|
||||
}
|
||||
|
||||
@@ -724,7 +781,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Information about the iroh node contained in an [`IROH_TXT_NAME`] TXT resource record.
|
||||
<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`].
|
||||
</span><span class="attr">#[derive(derive_more::Debug, Clone, Eq, PartialEq)]
|
||||
</span><span class="kw">pub struct </span>NodeInfo {
|
||||
<span class="doccomment">/// The [`NodeId`].
|
||||
@@ -765,7 +824,17 @@
|
||||
|
||||
<span class="kw">impl </span>From<NodeInfo> <span class="kw">for </span>NodeAddr {
|
||||
<span class="kw">fn </span>from(value: NodeInfo) -> <span class="self">Self </span>{
|
||||
value.data.into_node_addr(value.node_id)
|
||||
value.into_node_addr()
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">impl </span>From<NodeAddr> <span class="kw">for </span>NodeInfo {
|
||||
<span class="kw">fn </span>from(value: NodeAddr) -> <span class="self">Self </span>{
|
||||
<span class="kw">let </span>data = NodeData {
|
||||
direct_addresses: value.direct_addresses,
|
||||
relay_url: value.relay_url,
|
||||
};
|
||||
<span class="self">Self</span>::new(value.node_id, data)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -775,6 +844,24 @@
|
||||
<span class="self">Self </span>{ node_id, data }
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Converts into a [`NodeAddr`] by cloning the needed fields.
|
||||
</span><span class="kw">pub fn </span>node_addr(<span class="kw-2">&</span><span class="self">self</span>) -> NodeAddr {
|
||||
NodeAddr {
|
||||
node_id: <span class="self">self</span>.node_id,
|
||||
relay_url: <span class="self">self</span>.data.relay_url.clone(),
|
||||
direct_addresses: <span class="self">self</span>.data.direct_addresses.clone(),
|
||||
}
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Converts into a [`NodeAddr`] without cloning.
|
||||
</span><span class="kw">pub fn </span>into_node_addr(<span class="self">self</span>) -> NodeAddr {
|
||||
NodeAddr {
|
||||
node_id: <span class="self">self</span>.node_id,
|
||||
relay_url: <span class="self">self</span>.data.relay_url,
|
||||
direct_addresses: <span class="self">self</span>.data.direct_addresses,
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">fn </span>to_attrs(<span class="kw-2">&</span><span class="self">self</span>) -> TxtAttrs<IrohAttr> {
|
||||
<span class="self">self</span>.into()
|
||||
}
|
||||
@@ -808,6 +895,13 @@
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">impl </span>std::ops::Deref <span class="kw">for </span>NodeInfo {
|
||||
<span class="kw">type </span>Target = NodeData;
|
||||
<span class="kw">fn </span>deref(<span class="kw-2">&</span><span class="self">self</span>) -> <span class="kw-2">&</span><span class="self">Self</span>::Target {
|
||||
<span class="kw-2">&</span><span class="self">self</span>.data
|
||||
}
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Parses a [`NodeId`] from iroh DNS name.
|
||||
///
|
||||
/// Takes a [`hickory_resolver::proto::rr::Name`] DNS name and expects the first label to be
|
||||
|
||||
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/ops/deref/trait.Deref.html\" title=\"trait core::ops::deref::Deref\">Deref</a> for <a class=\"struct\" href=\"iroh_base/struct.RelayUrl.html\" title=\"struct iroh_base::RelayUrl\">RelayUrl</a>"]]],["iroh_relay",[["impl<Loader: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a>> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html\" title=\"trait core::ops::deref::Deref\">Deref</a> for <a class=\"struct\" href=\"iroh_relay/server/struct.ReloadingResolver.html\" title=\"struct iroh_relay::server::ReloadingResolver\">ReloadingResolver</a><Loader>"]]]]);
|
||||
var implementors = Object.fromEntries([["iroh",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html\" title=\"trait core::ops::deref::Deref\">Deref</a> for <a class=\"struct\" href=\"iroh/discovery/struct.DiscoveryItem.html\" title=\"struct iroh::discovery::DiscoveryItem\">DiscoveryItem</a>"]]],["iroh_base",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html\" title=\"trait core::ops::deref::Deref\">Deref</a> for <a class=\"struct\" href=\"iroh_base/struct.RelayUrl.html\" title=\"struct iroh_base::RelayUrl\">RelayUrl</a>"]]],["iroh_relay",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html\" title=\"trait core::ops::deref::Deref\">Deref</a> for <a class=\"struct\" href=\"iroh_relay/dns/node_info/struct.NodeInfo.html\" title=\"struct iroh_relay::dns::node_info::NodeInfo\">NodeInfo</a>"],["impl<Loader: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a>> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html\" title=\"trait core::ops::deref::Deref\">Deref</a> for <a class=\"struct\" href=\"iroh_relay/server/struct.ReloadingResolver.html\" title=\"struct iroh_relay::server::ReloadingResolver\">ReloadingResolver</a><Loader>"]]]]);
|
||||
if (window.register_implementors) {
|
||||
window.register_implementors(implementors);
|
||||
} else {
|
||||
window.pending_implementors = implementors;
|
||||
}
|
||||
})()
|
||||
//{"start":57,"fragment_lengths":[282,491]}
|
||||
//{"start":57,"fragment_lengths":[303,283,790]}
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user