deploy: 2e66189af0f63d90cbf8f4cca240c19d67cb1c3b

This commit is contained in:
rklaehn
2026-04-08 10:46:43 +00:00
parent ea0e50596f
commit db2a487527
8 changed files with 22 additions and 22 deletions
@@ -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="Parses a `EndpointId` from iroh DNS name."><title>endpoint_id_from_txt_name in iroh_dns::endpoint_info - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh_dns" data-themes="" data-resource-suffix="" data-rustdoc-version="1.92.0-nightly (b6f0945e4 2025-10-08)" data-channel="nightly" data-search-js="search-8d3311b9.js" data-stringdex-js="stringdex-828709d0.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-ce535bd0.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">endpoint_id_from_txt_name</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh_dns/index.html">iroh_<wbr>dns</a><span class="version">0.97.0</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In iroh_<wbr>dns::<wbr>endpoint_<wbr>info</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">iroh_dns</a>::<wbr><a href="index.html">endpoint_info</a></div><h1>Function <span class="fn">endpoint_<wbr>id_<wbr>from_<wbr>txt_<wbr>name</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/iroh_dns/endpoint_info.rs.html#58-73">Source</a> </span></div><pre class="rust item-decl"><code>pub fn endpoint_id_from_txt_name(name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="type" href="../../iroh_base/key/type.EndpointId.html" title="type iroh_base::key::EndpointId">EndpointId</a>, <a class="enum" href="enum.ParseError.html" title="enum iroh_dns::endpoint_info::ParseError">ParseError</a>&gt;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Parses a <a href="../../iroh_base/key/type.EndpointId.html" title="type iroh_base::key::EndpointId"><code>EndpointId</code></a> from iroh DNS name.</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="Parses a `EndpointId` from iroh DNS name."><title>endpoint_id_from_txt_name in iroh_dns::endpoint_info - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh_dns" data-themes="" data-resource-suffix="" data-rustdoc-version="1.92.0-nightly (b6f0945e4 2025-10-08)" data-channel="nightly" data-search-js="search-8d3311b9.js" data-stringdex-js="stringdex-828709d0.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-ce535bd0.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">endpoint_id_from_txt_name</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh_dns/index.html">iroh_<wbr>dns</a><span class="version">0.97.0</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In iroh_<wbr>dns::<wbr>endpoint_<wbr>info</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">iroh_dns</a>::<wbr><a href="index.html">endpoint_info</a></div><h1>Function <span class="fn">endpoint_<wbr>id_<wbr>from_<wbr>txt_<wbr>name</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/iroh_dns/endpoint_info.rs.html#58-73">Source</a> </span></div><pre class="rust item-decl"><code>pub fn endpoint_id_from_txt_name(name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;EndpointId, <a class="enum" href="enum.ParseError.html" title="enum iroh_dns::endpoint_info::ParseError">ParseError</a>&gt;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Parses a [<code>EndpointId</code>] from iroh DNS name.</p>
<p>Takes a DNS name and expects the first label to be <a href="constant.IROH_TXT_NAME.html" title="constant iroh_dns::endpoint_info::IROH_TXT_NAME"><code>IROH_TXT_NAME</code></a> and the second
label to be a z32 encoded <a href="../../iroh_base/key/type.EndpointId.html" title="type iroh_base::key::EndpointId"><code>EndpointId</code></a>. Ignores subsequent labels.</p>
label to be a z32 encoded [<code>EndpointId</code>]. Ignores subsequent labels.</p>
</div></details></section></div></main></body></html>
@@ -1,6 +1,6 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Support for handling DNS resource records for dialing by `EndpointId`."><title>iroh_dns::endpoint_info - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh_dns" data-themes="" data-resource-suffix="" data-rustdoc-version="1.92.0-nightly (b6f0945e4 2025-10-08)" data-channel="nightly" data-search-js="search-8d3311b9.js" data-stringdex-js="stringdex-828709d0.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-ce535bd0.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module endpoint_info</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh_dns/index.html">iroh_<wbr>dns</a><span class="version">0.97.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module endpoint_<wbr>info</a></h2><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#enums" title="Enums">Enums</a></li><li><a href="#constants" title="Constants">Constants</a></li><li><a href="#functions" title="Functions">Functions</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate iroh_<wbr>dns</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">iroh_dns</a></div><h1>Module <span>endpoint_<wbr>info</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/iroh_dns/endpoint_info.rs.html#1-188">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Support for handling DNS resource records for dialing by <a href="../../iroh_base/key/type.EndpointId.html" title="type iroh_base::key::EndpointId"><code>EndpointId</code></a>.</p>
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Support for handling DNS resource records for dialing by `EndpointId`."><title>iroh_dns::endpoint_info - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh_dns" data-themes="" data-resource-suffix="" data-rustdoc-version="1.92.0-nightly (b6f0945e4 2025-10-08)" data-channel="nightly" data-search-js="search-8d3311b9.js" data-stringdex-js="stringdex-828709d0.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-ce535bd0.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module endpoint_info</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh_dns/index.html">iroh_<wbr>dns</a><span class="version">0.97.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module endpoint_<wbr>info</a></h2><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#enums" title="Enums">Enums</a></li><li><a href="#constants" title="Constants">Constants</a></li><li><a href="#functions" title="Functions">Functions</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate iroh_<wbr>dns</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">iroh_dns</a></div><h1>Module <span>endpoint_<wbr>info</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/iroh_dns/endpoint_info.rs.html#1-188">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Support for handling DNS resource records for dialing by [<code>EndpointId</code>].</p>
<p>DNS records are published under the following names:</p>
<p><code>_iroh.&lt;z32-endpoint-id&gt;.&lt;origin-domain&gt; TXT</code></p>
<p>The returned TXT records must contain a string value of the form <code>key=value</code> as defined
in <a href="https://www.rfc-editor.org/rfc/rfc1464">RFC1464</a>.</p>
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.TxtAttrs.html" title="struct iroh_dns::endpoint_info::TxtAttrs">TxtAttrs</a></dt><dd>Attributes parsed from <a href="constant.IROH_TXT_NAME.html" title="constant iroh_dns::endpoint_info::IROH_TXT_NAME"><code>IROH_TXT_NAME</code></a> TXT records.</dd></dl><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><dl class="item-table"><dt><a class="enum" href="enum.EncodingError.html" title="enum iroh_dns::endpoint_info::EncodingError">Encoding<wbr>Error</a></dt><dt><a class="enum" href="enum.IrohAttr.html" title="enum iroh_dns::endpoint_info::IrohAttr">Iroh<wbr>Attr</a></dt><dd>The attributes supported by iroh for <a href="constant.IROH_TXT_NAME.html" title="constant iroh_dns::endpoint_info::IROH_TXT_NAME"><code>IROH_TXT_NAME</code></a> DNS resource records.</dd><dt><a class="enum" href="enum.ParseError.html" title="enum iroh_dns::endpoint_info::ParseError">Parse<wbr>Error</a></dt></dl><h2 id="constants" class="section-header">Constants<a href="#constants" class="anchor">§</a></h2><dl class="item-table"><dt><a class="constant" href="constant.IROH_TXT_NAME.html" title="constant iroh_dns::endpoint_info::IROH_TXT_NAME">IROH_<wbr>TXT_<wbr>NAME</a></dt><dd>The DNS name for the iroh TXT record.</dd></dl><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><dl class="item-table"><dt><a class="fn" href="fn.endpoint_id_from_txt_name.html" title="fn iroh_dns::endpoint_info::endpoint_id_from_txt_name">endpoint_<wbr>id_<wbr>from_<wbr>txt_<wbr>name</a></dt><dd>Parses a <a href="../../iroh_base/key/type.EndpointId.html" title="type iroh_base::key::EndpointId"><code>EndpointId</code></a> from iroh DNS name.</dd></dl></section></div></main></body></html>
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.TxtAttrs.html" title="struct iroh_dns::endpoint_info::TxtAttrs">TxtAttrs</a></dt><dd>Attributes parsed from <a href="constant.IROH_TXT_NAME.html" title="constant iroh_dns::endpoint_info::IROH_TXT_NAME"><code>IROH_TXT_NAME</code></a> TXT records.</dd></dl><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><dl class="item-table"><dt><a class="enum" href="enum.EncodingError.html" title="enum iroh_dns::endpoint_info::EncodingError">Encoding<wbr>Error</a></dt><dt><a class="enum" href="enum.IrohAttr.html" title="enum iroh_dns::endpoint_info::IrohAttr">Iroh<wbr>Attr</a></dt><dd>The attributes supported by iroh for <a href="constant.IROH_TXT_NAME.html" title="constant iroh_dns::endpoint_info::IROH_TXT_NAME"><code>IROH_TXT_NAME</code></a> DNS resource records.</dd><dt><a class="enum" href="enum.ParseError.html" title="enum iroh_dns::endpoint_info::ParseError">Parse<wbr>Error</a></dt></dl><h2 id="constants" class="section-header">Constants<a href="#constants" class="anchor">§</a></h2><dl class="item-table"><dt><a class="constant" href="constant.IROH_TXT_NAME.html" title="constant iroh_dns::endpoint_info::IROH_TXT_NAME">IROH_<wbr>TXT_<wbr>NAME</a></dt><dd>The DNS name for the iroh TXT record.</dd></dl><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><dl class="item-table"><dt><a class="fn" href="fn.endpoint_id_from_txt_name.html" title="fn iroh_dns::endpoint_info::endpoint_id_from_txt_name">endpoint_<wbr>id_<wbr>from_<wbr>txt_<wbr>name</a></dt><dd>Parses a [<code>EndpointId</code>] from iroh DNS name.</dd></dl></section></div></main></body></html>
@@ -3,15 +3,15 @@
all attributes. Can also be used with an enum, if it implements <a href="https://doc.rust-lang.org/nightly/core/str/traits/trait.FromStr.html" title="trait core::str::traits::FromStr"><code>FromStr</code></a> and
<a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display"><code>Display</code></a>.</p>
</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-TxtAttrs%3CT%3E" class="impl"><a class="src rightside" href="../../src/iroh_dns/endpoint_info.rs.html#102-188">Source</a><a href="#impl-TxtAttrs%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: <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="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>&gt; <a class="struct" href="struct.TxtAttrs.html" title="struct iroh_dns::endpoint_info::TxtAttrs">TxtAttrs</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from_parts" class="method"><a class="src rightside" href="../../src/iroh_dns/endpoint_info.rs.html#104-110">Source</a><h4 class="code-header">pub fn <a href="#method.from_parts" class="fn">from_parts</a>(
endpoint_id: <a class="type" href="../../iroh_base/key/type.EndpointId.html" title="type iroh_base::key::EndpointId">EndpointId</a>,
endpoint_id: EndpointId,
pairs: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>&lt;Item = (T, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>)&gt;,
) -&gt; Self</h4></section></summary><div class="docblock"><p>Creates <a href="struct.TxtAttrs.html" title="struct iroh_dns::endpoint_info::TxtAttrs"><code>TxtAttrs</code></a> from an endpoint id and an iterator of key-value pairs.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_strings" class="method"><a class="src rightside" href="../../src/iroh_dns/endpoint_info.rs.html#113-131">Source</a><h4 class="code-header">pub fn <a href="#method.from_strings" class="fn">from_strings</a>(
endpoint_id: <a class="type" href="../../iroh_base/key/type.EndpointId.html" title="type iroh_base::key::EndpointId">EndpointId</a>,
endpoint_id: EndpointId,
strings: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>&lt;Item = <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, <a class="enum" href="enum.ParseError.html" title="enum iroh_dns::endpoint_info::ParseError">ParseError</a>&gt;</h4></section></summary><div class="docblock"><p>Creates <a href="struct.TxtAttrs.html" title="struct iroh_dns::endpoint_info::TxtAttrs"><code>TxtAttrs</code></a> from an endpoint id and an iterator of “{key}={value}” strings.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.attrs" class="method"><a class="src rightside" href="../../src/iroh_dns/endpoint_info.rs.html#134-136">Source</a><h4 class="code-header">pub fn <a href="#method.attrs" class="fn">attrs</a>(&amp;self) -&gt; &amp;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a>&lt;T, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;&gt;</h4></section></summary><div class="docblock"><p>Returns the parsed attributes.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.endpoint_id" class="method"><a class="src rightside" href="../../src/iroh_dns/endpoint_info.rs.html#139-141">Source</a><h4 class="code-header">pub fn <a href="#method.endpoint_id" class="fn">endpoint_id</a>(&amp;self) -&gt; <a class="type" href="../../iroh_base/key/type.EndpointId.html" title="type iroh_base::key::EndpointId">EndpointId</a></h4></section></summary><div class="docblock"><p>Returns the endpoint id.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.endpoint_id" class="method"><a class="src rightside" href="../../src/iroh_dns/endpoint_info.rs.html#139-141">Source</a><h4 class="code-header">pub fn <a href="#method.endpoint_id" class="fn">endpoint_id</a>(&amp;self) -&gt; EndpointId</h4></section></summary><div class="docblock"><p>Returns the endpoint id.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_txt_lookup" class="method"><a class="src rightside" href="../../src/iroh_dns/endpoint_info.rs.html#147-154">Source</a><h4 class="code-header">pub fn <a href="#method.from_txt_lookup" class="fn">from_txt_lookup</a>(
name: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>,
lookup: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>&lt;Item = impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a>&gt;,
@@ -24,10 +24,10 @@ values that implement <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.
</div></details><details class="toggle method-toggle" open><summary><section id="method.to_txt_strings" class="method"><a class="src rightside" href="../../src/iroh_dns/endpoint_info.rs.html#165-169">Source</a><h4 class="code-header">pub fn <a href="#method.to_txt_strings" class="fn">to_txt_strings</a>(&amp;self) -&gt; impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>&lt;Item = <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt; + '_</h4></section></summary><div class="docblock"><p>Converts to <code>{key}={value}</code> strings.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.to_pkarr_signed_packet" class="method"><a class="src rightside" href="../../src/iroh_dns/endpoint_info.rs.html#174-187">Source</a><h4 class="code-header">pub fn <a href="#method.to_pkarr_signed_packet" class="fn">to_pkarr_signed_packet</a>(
&amp;self,
secret_key: &amp;<a class="struct" href="../../iroh_base/key/struct.SecretKey.html" title="struct iroh_base::key::SecretKey">SecretKey</a>,
secret_key: &amp;SecretKey,
ttl: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../pkarr/struct.SignedPacket.html" title="struct iroh_dns::pkarr::SignedPacket">SignedPacket</a>, <a class="enum" href="enum.EncodingError.html" title="enum iroh_dns::endpoint_info::EncodingError">EncodingError</a>&gt;</h4></section></summary><div class="docblock"><p>Creates a <a href="../pkarr/struct.SignedPacket.html" title="struct iroh_dns::pkarr::SignedPacket"><code>pkarr::SignedPacket</code></a></p>
<p>This constructs a DNS packet and signs it with a <a href="../../iroh_base/key/struct.SecretKey.html" title="struct iroh_base::key::SecretKey"><code>SecretKey</code></a>.</p>
<p>This constructs a DNS packet and signs it with a [<code>SecretKey</code>].</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-TxtAttrs%3CT%3E" class="impl"><a class="src rightside" href="../../src/iroh_dns/endpoint_info.rs.html#96">Source</a><a href="#impl-Debug-for-TxtAttrs%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>&gt; <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.TxtAttrs.html" title="struct iroh_dns::endpoint_info::TxtAttrs">TxtAttrs</a>&lt;T&gt;</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_dns/endpoint_info.rs.html#96">Source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-Freeze-for-TxtAttrs%3CT%3E" class="impl"><a href="#impl-Freeze-for-TxtAttrs%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <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.TxtAttrs.html" title="struct iroh_dns::endpoint_info::TxtAttrs">TxtAttrs</a>&lt;T&gt;</h3></section><section id="impl-RefUnwindSafe-for-TxtAttrs%3CT%3E" class="impl"><a href="#impl-RefUnwindSafe-for-TxtAttrs%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <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.TxtAttrs.html" title="struct iroh_dns::endpoint_info::TxtAttrs">TxtAttrs</a>&lt;T&gt;<div class="where">where
T: <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>,</div></h3></section><section id="impl-Send-for-TxtAttrs%3CT%3E" class="impl"><a href="#impl-Send-for-TxtAttrs%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <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.TxtAttrs.html" title="struct iroh_dns::endpoint_info::TxtAttrs">TxtAttrs</a>&lt;T&gt;<div class="where">where
T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,</div></h3></section><section id="impl-Sync-for-TxtAttrs%3CT%3E" class="impl"><a href="#impl-Sync-for-TxtAttrs%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <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.TxtAttrs.html" title="struct iroh_dns::endpoint_info::TxtAttrs">TxtAttrs</a>&lt;T&gt;<div class="where">where
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="DNS-based endpoint discovery for iroh."><title>iroh_dns - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="iroh_dns" data-themes="" data-resource-suffix="" data-rustdoc-version="1.92.0-nightly (b6f0945e4 2025-10-08)" data-channel="nightly" data-search-js="search-8d3311b9.js" data-stringdex-js="stringdex-828709d0.js" data-settings-js="settings-c38705f0.js" ><script src="../static.files/storage-e2aeef58.js"></script><script defer src="../crates.js"></script><script defer src="../static.files/main-ce535bd0.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc mod crate"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Crate iroh_dns</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../iroh_dns/index.html">iroh_<wbr>dns</a><span class="version">0.97.0</span></h2></div><div class="sidebar-elems"><ul class="block"><li><a id="all-types" href="all.html">All Items</a></li></ul><section id="rustdoc-toc"><h3><a href="#modules">Crate Items</a></h3><ul class="block"><li><a href="#modules" title="Modules">Modules</a></li><li><a href="#enums" title="Enums">Enums</a></li><li><a href="#traits" title="Traits">Traits</a></li></ul></section><div id="rustdoc-modnav"></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><h1>Crate <span>iroh_<wbr>dns</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/iroh_dns/lib.rs.html#1-59">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>DNS-based endpoint discovery for iroh.</p>
<p>This crate contains the core types for publishing and resolving iroh endpoint
information via DNS, using the <a href="https://pkarr.org">pkarr</a> signed packet format.</p>
</div></details><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><dl class="item-table"><dt><a class="mod" href="endpoint_info/index.html" title="mod iroh_dns::endpoint_info">endpoint_<wbr>info</a></dt><dd>Support for handling DNS resource records for dialing by <a href="../iroh_base/key/type.EndpointId.html" title="type iroh_base::key::EndpointId"><code>EndpointId</code></a>.</dd><dt><a class="mod" href="pkarr/index.html" title="mod iroh_dns::pkarr">pkarr</a></dt><dd>Pkarr signed packet encoding.</dd></dl><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><dl class="item-table"><dt><a class="enum" href="enum.DecodingError.html" title="enum iroh_dns::DecodingError">Decoding<wbr>Error</a></dt></dl><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><dl class="item-table"><dt><a class="trait" href="trait.EndpointIdExt.html" title="trait iroh_dns::EndpointIdExt">Endpoint<wbr>IdExt</a></dt><dd>Extension methods for <a href="../iroh_base/key/type.EndpointId.html" title="type iroh_base::key::EndpointId"><code>EndpointId</code></a> to encode to and decode from z-base-32,
</div></details><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><dl class="item-table"><dt><a class="mod" href="endpoint_info/index.html" title="mod iroh_dns::endpoint_info">endpoint_<wbr>info</a></dt><dd>Support for handling DNS resource records for dialing by [<code>EndpointId</code>].</dd><dt><a class="mod" href="pkarr/index.html" title="mod iroh_dns::pkarr">pkarr</a></dt><dd>Pkarr signed packet encoding.</dd></dl><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><dl class="item-table"><dt><a class="enum" href="enum.DecodingError.html" title="enum iroh_dns::DecodingError">Decoding<wbr>Error</a></dt></dl><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><dl class="item-table"><dt><a class="trait" href="trait.EndpointIdExt.html" title="trait iroh_dns::EndpointIdExt">Endpoint<wbr>IdExt</a></dt><dd>Extension methods for [<code>EndpointId</code>] to encode to and decode from z-base-32,
which is the encoding used by <a href="https://pkarr.org">pkarr</a> domain names.</dd></dl></section></div></main></body></html>
@@ -3,7 +3,7 @@
<p>The DNS packet must be at most 1000 bytes. Total max size is 1104 bytes.</p>
</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-SignedPacket" class="impl"><a class="src rightside" href="../../src/iroh_dns/pkarr.rs.html#33-253">Source</a><a href="#impl-SignedPacket" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.SignedPacket.html" title="struct iroh_dns::pkarr::SignedPacket">SignedPacket</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedconstant.MAX_BYTES" class="associatedconstant"><a class="src rightside" href="../../src/iroh_dns/pkarr.rs.html#35">Source</a><h4 class="code-header">pub const <a href="#associatedconstant.MAX_BYTES" class="constant">MAX_BYTES</a>: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a> = 1_104usize</h4></section></summary><div class="docblock"><p>Maximum total byte size of a signed packet.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_txt_strings" class="method"><a class="src rightside" href="../../src/iroh_dns/pkarr.rs.html#40-82">Source</a><h4 class="code-header">pub fn <a href="#method.from_txt_strings" class="fn">from_txt_strings</a>(
secret_key: &amp;<a class="struct" href="../../iroh_base/key/struct.SecretKey.html" title="struct iroh_base::key::SecretKey">SecretKey</a>,
secret_key: &amp;SecretKey,
name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
values: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&lt;Item = impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>&gt;&gt;,
ttl: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>,
@@ -11,7 +11,7 @@
<p>This is the common case: multiple TXT values under the same DNS name (e.g. <code>"_iroh"</code>).</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_bytes" class="method"><a class="src rightside" href="../../src/iroh_dns/pkarr.rs.html#85-111">Source</a><h4 class="code-header">pub fn <a href="#method.from_bytes" class="fn">from_bytes</a>(bytes: &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.SignedPacket.html" title="struct iroh_dns::pkarr::SignedPacket">SignedPacket</a>, <a class="enum" href="enum.SignedPacketVerifyError.html" title="enum iroh_dns::pkarr::SignedPacketVerifyError">SignedPacketVerifyError</a>&gt;</h4></section></summary><div class="docblock"><p>Parse and verify a signed packet from its wire representation.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_relay_payload" class="method"><a class="src rightside" href="../../src/iroh_dns/pkarr.rs.html#114-122">Source</a><h4 class="code-header">pub fn <a href="#method.from_relay_payload" class="fn">from_relay_payload</a>(
public_key: &amp;<a class="struct" href="../../iroh_base/key/struct.PublicKey.html" title="struct iroh_base::key::PublicKey">PublicKey</a>,
public_key: &amp;PublicKey,
payload: &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>],
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.SignedPacket.html" title="struct iroh_dns::pkarr::SignedPacket">SignedPacket</a>, <a class="enum" href="enum.SignedPacketVerifyError.html" title="enum iroh_dns::pkarr::SignedPacketVerifyError">SignedPacketVerifyError</a>&gt;</h4></section></summary><div class="docblock"><p>Create from a public key and relay payload (signature + timestamp + dns).</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_bytes_unchecked" class="method"><a class="src rightside" href="../../src/iroh_dns/pkarr.rs.html#127-139">Source</a><h4 class="code-header">pub fn <a href="#method.from_bytes_unchecked" class="fn">from_bytes_unchecked</a>(
@@ -20,8 +20,8 @@
<p>Still validates minimum length and DNS parsing.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.as_bytes" class="method"><a class="src rightside" href="../../src/iroh_dns/pkarr.rs.html#142-144">Source</a><h4 class="code-header">pub fn <a href="#method.as_bytes" class="fn">as_bytes</a>(&amp;self) -&gt; &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>] <a href="#" class="tooltip" data-notable-ty="&amp;[u8]">ⓘ</a></h4></section></summary><div class="docblock"><p>Return the full serialized bytes.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.to_relay_payload" class="method"><a class="src rightside" href="../../src/iroh_dns/pkarr.rs.html#147-149">Source</a><h4 class="code-header">pub fn <a href="#method.to_relay_payload" class="fn">to_relay_payload</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt; <a href="#" class="tooltip" data-notable-ty="Vec&lt;u8&gt;">ⓘ</a></h4></section></summary><div class="docblock"><p>Return the relay payload (everything after the public key).</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.public_key" class="method"><a class="src rightside" href="../../src/iroh_dns/pkarr.rs.html#152-154">Source</a><h4 class="code-header">pub fn <a href="#method.public_key" class="fn">public_key</a>(&amp;self) -&gt; <a class="struct" href="../../iroh_base/key/struct.PublicKey.html" title="struct iroh_base::key::PublicKey">PublicKey</a></h4></section></summary><div class="docblock"><p>Return the public key.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.signature" class="method"><a class="src rightside" href="../../src/iroh_dns/pkarr.rs.html#157-163">Source</a><h4 class="code-header">pub fn <a href="#method.signature" class="fn">signature</a>(&amp;self) -&gt; <a class="struct" href="../../iroh_base/key/struct.Signature.html" title="struct iroh_base::key::Signature">Signature</a></h4></section></summary><div class="docblock"><p>Return the signature.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.public_key" class="method"><a class="src rightside" href="../../src/iroh_dns/pkarr.rs.html#152-154">Source</a><h4 class="code-header">pub fn <a href="#method.public_key" class="fn">public_key</a>(&amp;self) -&gt; PublicKey</h4></section></summary><div class="docblock"><p>Return the public key.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.signature" class="method"><a class="src rightside" href="../../src/iroh_dns/pkarr.rs.html#157-163">Source</a><h4 class="code-header">pub fn <a href="#method.signature" class="fn">signature</a>(&amp;self) -&gt; Signature</h4></section></summary><div class="docblock"><p>Return the signature.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.timestamp" class="method"><a class="src rightside" href="../../src/iroh_dns/pkarr.rs.html#166-172">Source</a><h4 class="code-header">pub fn <a href="#method.timestamp" class="fn">timestamp</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></h4></section></summary><div class="docblock"><p>Return the timestamp in microseconds since UNIX epoch.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.encoded_packet" class="method"><a class="src rightside" href="../../src/iroh_dns/pkarr.rs.html#175-177">Source</a><h4 class="code-header">pub fn <a href="#method.encoded_packet" class="fn">encoded_packet</a>(&amp;self) -&gt; &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>] <a href="#" class="tooltip" data-notable-ty="&amp;[u8]">ⓘ</a></h4></section></summary><div class="docblock"><p>Return the encoded DNS packet bytes.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.txt_records" class="method"><a class="src rightside" href="../../src/iroh_dns/pkarr.rs.html#183-214">Source</a><h4 class="code-header">pub fn <a href="#method.txt_records" class="fn">txt_records</a>(&amp;self, name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;</h4></section></summary><div class="docblock"><p>Iterate over TXT records under a specific DNS name.</p>
@@ -1,9 +1,9 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Extension methods for `EndpointId` to encode to and decode from z-base-32, which is the encoding used by pkarr domain names."><title>EndpointIdExt in iroh_dns - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="iroh_dns" data-themes="" data-resource-suffix="" data-rustdoc-version="1.92.0-nightly (b6f0945e4 2025-10-08)" data-channel="nightly" data-search-js="search-8d3311b9.js" data-stringdex-js="stringdex-828709d0.js" data-settings-js="settings-c38705f0.js" ><script src="../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-ce535bd0.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">EndpointIdExt</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../iroh_dns/index.html">iroh_<wbr>dns</a><span class="version">0.97.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Endpoint<wbr>IdExt</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.from_z32" title="from_z32">from_z32</a></li><li><a href="#tymethod.to_z32" title="to_z32">to_z32</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-EndpointIdExt-for-PublicKey" title="EndpointId">EndpointId</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate iroh_<wbr>dns</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="index.html">iroh_dns</a></div><h1>Trait <span class="trait">Endpoint<wbr>IdExt</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/iroh_dns/lib.rs.html#38-44">Source</a> </span></div><pre class="rust item-decl"><code>pub trait EndpointIdExt {
// Required methods
fn <a href="#tymethod.to_z32" class="fn">to_z32</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.from_z32" class="fn">from_z32</a>(s: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="type" href="../iroh_base/key/type.EndpointId.html" title="type iroh_base::key::EndpointId">EndpointId</a>, <a class="enum" href="enum.DecodingError.html" title="enum iroh_dns::DecodingError">DecodingError</a>&gt;;
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Extension methods for <a href="../iroh_base/key/type.EndpointId.html" title="type iroh_base::key::EndpointId"><code>EndpointId</code></a> to encode to and decode from z-base-32,
<span class="item-spacer"></span> fn <a href="#tymethod.from_z32" class="fn">from_z32</a>(s: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;EndpointId, <a class="enum" href="enum.DecodingError.html" title="enum iroh_dns::DecodingError">DecodingError</a>&gt;;
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Extension methods for [<code>EndpointId</code>] to encode to and decode from z-base-32,
which is the encoding used by <a href="https://pkarr.org">pkarr</a> 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_dns/lib.rs.html#40">Source</a><h4 class="code-header">fn <a href="#tymethod.to_z32" class="fn">to_z32</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section></summary><div class="docblock"><p>Encodes a <a href="../iroh_base/key/type.EndpointId.html" title="type iroh_base::key::EndpointId"><code>EndpointId</code></a> in <a href="https://philzimmermann.com/docs/human-oriented-base-32-encoding.txt">z-base-32</a> encoding.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.from_z32" class="method"><a class="src rightside" href="../src/iroh_dns/lib.rs.html#43">Source</a><h4 class="code-header">fn <a href="#tymethod.from_z32" class="fn">from_z32</a>(s: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="type" href="../iroh_base/key/type.EndpointId.html" title="type iroh_base::key::EndpointId">EndpointId</a>, <a class="enum" href="enum.DecodingError.html" title="enum iroh_dns::DecodingError">DecodingError</a>&gt;</h4></section></summary><div class="docblock"><p>Parses a <a href="../iroh_base/key/type.EndpointId.html" title="type iroh_base::key::EndpointId"><code>EndpointId</code></a> from <a href="https://philzimmermann.com/docs/human-oriented-base-32-encoding.txt">z-base-32</a> encoding.</p>
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/nightly/reference/items/traits.html#dyn-compatibility">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><details class="toggle implementors-toggle"><summary><section id="impl-EndpointIdExt-for-PublicKey" class="impl"><a class="src rightside" href="../src/iroh_dns/lib.rs.html#46-59">Source</a><a href="#impl-EndpointIdExt-for-PublicKey" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.EndpointIdExt.html" title="trait iroh_dns::EndpointIdExt">EndpointIdExt</a> for <a class="type" href="../iroh_base/key/type.EndpointId.html" title="type iroh_base::key::EndpointId">EndpointId</a></h3></section></summary><div class="impl-items"><section id="method.to_z32" class="method trait-impl"><a class="src rightside" href="../src/iroh_dns/lib.rs.html#47-49">Source</a><a href="#method.to_z32" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_z32" class="fn">to_z32</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section><section id="method.from_z32" class="method trait-impl"><a class="src rightside" href="../src/iroh_dns/lib.rs.html#51-58">Source</a><a href="#method.from_z32" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.from_z32" class="fn">from_z32</a>(s: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="type" href="../iroh_base/key/type.EndpointId.html" title="type iroh_base::key::EndpointId">EndpointId</a>, <a class="enum" href="enum.DecodingError.html" title="enum iroh_dns::DecodingError">DecodingError</a>&gt;</h4></section></div></details><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../trait.impl/iroh_dns/trait.EndpointIdExt.js" data-ignore-extern-crates="iroh_base" async></script></section></div></main></body></html>
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.to_z32" class="method"><a class="src rightside" href="../src/iroh_dns/lib.rs.html#40">Source</a><h4 class="code-header">fn <a href="#tymethod.to_z32" class="fn">to_z32</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section></summary><div class="docblock"><p>Encodes a [<code>EndpointId</code>] in <a href="https://philzimmermann.com/docs/human-oriented-base-32-encoding.txt">z-base-32</a> encoding.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.from_z32" class="method"><a class="src rightside" href="../src/iroh_dns/lib.rs.html#43">Source</a><h4 class="code-header">fn <a href="#tymethod.from_z32" class="fn">from_z32</a>(s: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;EndpointId, <a class="enum" href="enum.DecodingError.html" title="enum iroh_dns::DecodingError">DecodingError</a>&gt;</h4></section></summary><div class="docblock"><p>Parses a [<code>EndpointId</code>] from <a href="https://philzimmermann.com/docs/human-oriented-base-32-encoding.txt">z-base-32</a> encoding.</p>
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/nightly/reference/items/traits.html#dyn-compatibility">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><details class="toggle implementors-toggle"><summary><section id="impl-EndpointIdExt-for-PublicKey" class="impl"><a class="src rightside" href="../src/iroh_dns/lib.rs.html#46-59">Source</a><a href="#impl-EndpointIdExt-for-PublicKey" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.EndpointIdExt.html" title="trait iroh_dns::EndpointIdExt">EndpointIdExt</a> for EndpointId</h3></section></summary><div class="impl-items"><section id="method.to_z32" class="method trait-impl"><a class="src rightside" href="../src/iroh_dns/lib.rs.html#47-49">Source</a><a href="#method.to_z32" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_z32" class="fn">to_z32</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section><section id="method.from_z32" class="method trait-impl"><a class="src rightside" href="../src/iroh_dns/lib.rs.html#51-58">Source</a><a href="#method.from_z32" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.from_z32" class="fn">from_z32</a>(s: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;EndpointId, <a class="enum" href="enum.DecodingError.html" title="enum iroh_dns::DecodingError">DecodingError</a>&gt;</h4></section></div></details><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../trait.impl/iroh_dns/trait.EndpointIdExt.js" data-ignore-extern-crates="iroh_base" async></script></section></div></main></body></html>
@@ -330,7 +330,7 @@
<a href=#330 id=330 data-nosnippet>330</a> #[ignore = <span class="string">"flaky"</span>]
<a href=#331 id=331 data-nosnippet>331</a> #[traced_test]
<a href=#332 id=332 data-nosnippet>332</a> </span><span class="kw">async fn </span>dht_address_lookup_smoke() -&gt; <span class="prelude-ty">Result</span> {
<a href=#333 id=333 data-nosnippet>333</a> <span class="kw">let </span>secret = SecretKey::generate(<span class="kw-2">&amp;mut </span>rand::rng());
<a href=#333 id=333 data-nosnippet>333</a> <span class="kw">let </span>secret = SecretKey::generate();
<a href=#334 id=334 data-nosnippet>334</a> <span class="kw">let </span>testnet = Testnet::new_async(<span class="number">3</span>).<span class="kw">await</span>.anyerr()<span class="question-mark">?</span>;
<a href=#335 id=335 data-nosnippet>335</a> <span class="kw">let </span><span class="kw-2">mut </span>dht_builder = DhtBuilder::default();
<a href=#336 id=336 data-nosnippet>336</a> dht_builder.bootstrap(<span class="kw-2">&amp;</span>testnet.bootstrap);