deploy: 2ce5eab6e19a4734039b9507e6d34a6e672bd43c

This commit is contained in:
Frando
2025-02-06 13:15:55 +00:00
parent db7bd8aaf2
commit c19ac29bfc
12 changed files with 122 additions and 169 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,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-402">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>
<!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>
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
+27 -27
View File
@@ -6152,6 +6152,28 @@
<span class="kw">let </span>inner2 = inner.clone();
<span class="kw">let </span>network_monitor = netmon::Monitor::new().<span class="kw">await</span><span class="question-mark">?</span>;
<span class="kw">let </span>qad_endpoint = endpoint.clone();
<span class="comment">// create a client config for the endpoint to use for QUIC address discovery
</span><span class="kw">let </span>root_store =
rustls::RootCertStore::from_iter(webpki_roots::TLS_SERVER_ROOTS.iter().cloned());
<span class="kw">let </span>client_config = rustls::client::ClientConfig::builder_with_provider(Arc::new(
rustls::crypto::ring::default_provider(),
))
.with_safe_default_protocol_versions()
.expect(<span class="string">"ring supports these"</span>)
.with_root_certificates(root_store)
.with_no_client_auth();
<span class="kw">let </span>quic_config = <span class="prelude-val">Some</span>(QuicConfig {
ep: qad_endpoint,
client_config,
ipv4: <span class="bool-val">true</span>,
ipv6: pconn6_sock.is_some(),
});
<span class="kw">let </span>net_report_config = net_report::Options::default()
.stun_v4(<span class="prelude-val">Some</span>(pconn4_sock.clone()))
.stun_v6(pconn6_sock.clone())
.quic_config(quic_config);
actor_tasks.spawn(
<span class="kw">async move </span>{
<span class="kw">let </span>actor = Actor {
@@ -6168,7 +6190,7 @@
no_v4_send: <span class="bool-val">false</span>,
net_reporter,
network_monitor,
qad_endpoint,
net_report_config,
};
<span class="kw">if let </span><span class="prelude-val">Err</span>(err) = actor.run().<span class="kw">await </span>{
@@ -6584,6 +6606,9 @@
</span>pconn4: Arc&lt;UdpSocket&gt;,
pconn6: <span class="prelude-ty">Option</span>&lt;Arc&lt;UdpSocket&gt;&gt;,
<span class="doccomment">/// Configuration for net report
</span>net_report_config: net_report::Options,
<span class="doccomment">/// The NAT-PMP/PCP/UPnP prober/client, for requesting port mappings from NAT devices.
</span>port_mapper: portmapper::Client,
@@ -6596,11 +6621,6 @@
</span>net_reporter: net_report::Client,
network_monitor: netmon::Monitor,
<span class="doccomment">/// The internal quinn::Endpoint
///
/// Needed for Quic Address Discovery
</span>qad_endpoint: quinn::Endpoint,
}
<span class="kw">impl </span>Actor {
@@ -7014,27 +7034,7 @@
}
<span class="kw">let </span>relay_map = <span class="self">self</span>.msock.relay_map.clone();
<span class="kw">let </span><span class="kw-2">mut </span>opts = net_report::Options::default()
.stun_v4(<span class="prelude-val">Some</span>(<span class="self">self</span>.pconn4.clone()))
.stun_v6(<span class="self">self</span>.pconn6.clone());
<span class="comment">// create a client config for the endpoint to use for QUIC address discovery
</span><span class="kw">let </span>root_store =
rustls::RootCertStore::from_iter(webpki_roots::TLS_SERVER_ROOTS.iter().cloned());
<span class="kw">let </span>client_config = rustls::client::ClientConfig::builder_with_provider(Arc::new(
rustls::crypto::ring::default_provider(),
))
.with_safe_default_protocol_versions()
.expect(<span class="string">"ring supports these"</span>)
.with_root_certificates(root_store)
.with_no_client_auth();
<span class="kw">let </span>quic_config = <span class="prelude-val">Some</span>(QuicConfig {
ep: <span class="self">self</span>.qad_endpoint.clone(),
client_config,
ipv4: <span class="bool-val">true</span>,
ipv6: <span class="self">self</span>.pconn6.is_some(),
});
opts = opts.quic_config(quic_config);
<span class="kw">let </span>opts = <span class="self">self</span>.net_report_config.clone();
<span class="macro">debug!</span>(<span class="string">"requesting net_report report"</span>);
<span class="kw">match </span><span class="self">self</span>.net_reporter.get_report_channel(relay_map, opts).<span class="kw">await </span>{
+1 -1
View File
@@ -1693,7 +1693,7 @@
///
/// Use [`Options::stun_v4`], [`Options::stun_v6`], and [`Options::quic_config`]
/// to enable STUN over IPv4, STUN over IPv6, and QUIC address discovery.
</span><span class="attr">#[derive(Debug)]
</span><span class="attr">#[derive(Debug, Clone)]
</span><span class="kw">pub struct </span>Options {
<span class="doccomment">/// Socket to send IPv4 STUN probes from.
///
+1 -59
View File
@@ -161,36 +161,7 @@
<a href="#160" id="160">160</a>
<a href="#161" id="161">161</a>
<a href="#162" id="162">162</a>
<a href="#163" id="163">163</a>
<a href="#164" id="164">164</a>
<a href="#165" id="165">165</a>
<a href="#166" id="166">166</a>
<a href="#167" id="167">167</a>
<a href="#168" id="168">168</a>
<a href="#169" id="169">169</a>
<a href="#170" id="170">170</a>
<a href="#171" id="171">171</a>
<a href="#172" id="172">172</a>
<a href="#173" id="173">173</a>
<a href="#174" id="174">174</a>
<a href="#175" id="175">175</a>
<a href="#176" id="176">176</a>
<a href="#177" id="177">177</a>
<a href="#178" id="178">178</a>
<a href="#179" id="179">179</a>
<a href="#180" id="180">180</a>
<a href="#181" id="181">181</a>
<a href="#182" id="182">182</a>
<a href="#183" id="183">183</a>
<a href="#184" id="184">184</a>
<a href="#185" id="185">185</a>
<a href="#186" id="186">186</a>
<a href="#187" id="187">187</a>
<a href="#188" id="188">188</a>
<a href="#189" id="189">189</a>
<a href="#190" id="190">190</a>
<a href="#191" id="191">191</a>
<a href="#192" id="192">192</a></pre></div><pre class="rust"><code><span class="doccomment">//! Allows sending ICMP echo requests to a host in order to determine network latency.
<a href="#163" id="163">163</a></pre></div><pre class="rust"><code><span class="doccomment">//! Allows sending ICMP echo requests to a host in order to determine network latency.
</span><span class="kw">use </span>std::{
fmt::Debug,
@@ -320,35 +291,6 @@
<span class="kw">use super</span>::<span class="kw-2">*</span>;
<span class="attr">#[tokio::test]
#[ignore] </span><span class="comment">// Doesn't work in CI
</span><span class="attr">#[traced_test]
</span><span class="kw">async fn </span>test_ping_google() -&gt; <span class="prelude-ty">Result</span>&lt;()&gt; {
<span class="comment">// Public DNS addrs from google based on
// https://developers.google.com/speed/public-dns/docs/using
</span><span class="kw">let </span>pinger = Pinger::new();
<span class="comment">// IPv4
</span><span class="kw">let </span>dur = pinger.send(<span class="string">"8.8.8.8"</span>.parse()<span class="question-mark">?</span>, <span class="kw-2">&amp;</span>[<span class="number">1u8</span>; <span class="number">8</span>]).<span class="kw">await</span><span class="question-mark">?</span>;
<span class="macro">assert!</span>(!dur.is_zero());
<span class="comment">// IPv6
</span><span class="kw">match </span>pinger
.send(<span class="string">"2001:4860:4860:0:0:0:0:8888"</span>.parse()<span class="question-mark">?</span>, <span class="kw-2">&amp;</span>[<span class="number">1u8</span>; <span class="number">8</span>])
.<span class="kw">await
</span>{
<span class="prelude-val">Ok</span>(dur) =&gt; {
<span class="macro">assert!</span>(!dur.is_zero());
}
<span class="prelude-val">Err</span>(err) =&gt; {
<span class="macro">tracing::error!</span>(<span class="string">"IPv6 is not available: {:?}"</span>, err);
}
}
<span class="prelude-val">Ok</span>(())
}
<span class="comment">// See net_report::reportgen::tests::test_icmp_probe_eu_relay for permissions to ping.
</span><span class="attr">#[tokio::test]
#[traced_test]
+30 -16
View File
@@ -400,7 +400,14 @@
<a href="#399" id="399">399</a>
<a href="#400" id="400">400</a>
<a href="#401" id="401">401</a>
<a href="#402" id="402">402</a></pre></div><pre class="rust"><code><span class="doccomment">//! DNS resolver
<a href="#402" id="402">402</a>
<a href="#403" id="403">403</a>
<a href="#404" id="404">404</a>
<a href="#405" id="405">405</a>
<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
</span><span class="kw">use </span>std::{
fmt::{<span class="self">self</span>, Write},
@@ -409,7 +416,7 @@
};
<span class="kw">use </span>anyhow::{bail, Context, <span class="prelude-ty">Result</span>};
<span class="kw">use </span>hickory_resolver::{IntoName, Resolver, TokioResolver};
<span class="kw">use </span>hickory_resolver::{Resolver, TokioResolver};
<span class="kw">use </span>iroh_base::{NodeAddr, NodeId};
<span class="kw">use </span>n0_future::{
time::{<span class="self">self</span>, Duration},
@@ -477,27 +484,30 @@
}
<span class="doccomment">/// Lookup a TXT record.
</span><span class="kw">pub async fn </span>lookup_txt(<span class="kw-2">&amp;</span><span class="self">self</span>, query: <span class="kw">impl </span>IntoName, timeout: Duration) -&gt; <span class="prelude-ty">Result</span>&lt;TxtLookup&gt; {
<span class="kw">let </span>res = time::timeout(timeout, <span class="self">self</span>.<span class="number">0</span>.txt_lookup(query)).<span class="kw">await</span><span class="question-mark">??</span>;
</span><span class="kw">pub async fn </span>lookup_txt(<span class="kw-2">&amp;</span><span class="self">self</span>, host: <span class="kw">impl </span>ToString, timeout: Duration) -&gt; <span class="prelude-ty">Result</span>&lt;TxtLookup&gt; {
<span class="kw">let </span>host = host.to_string();
<span class="kw">let </span>res = time::timeout(timeout, <span class="self">self</span>.<span class="number">0</span>.txt_lookup(host)).<span class="kw">await</span><span class="question-mark">??</span>;
<span class="prelude-val">Ok</span>(TxtLookup(res))
}
<span class="doccomment">/// Perform an ipv4 lookup with a timeout.
</span><span class="kw">pub async fn </span>lookup_ipv4&lt;N: IntoName&gt;(
</span><span class="kw">pub async fn </span>lookup_ipv4(
<span class="kw-2">&amp;</span><span class="self">self</span>,
host: N,
host: <span class="kw">impl </span>ToString,
timeout: Duration,
) -&gt; <span class="prelude-ty">Result</span>&lt;<span class="kw">impl </span>Iterator&lt;Item = IpAddr&gt;&gt; {
<span class="kw">let </span>host = host.to_string();
<span class="kw">let </span>addrs = time::timeout(timeout, <span class="self">self</span>.<span class="number">0</span>.ipv4_lookup(host)).<span class="kw">await</span><span class="question-mark">??</span>;
<span class="prelude-val">Ok</span>(addrs.into_iter().map(|ip| IpAddr::V4(ip.<span class="number">0</span>)))
}
<span class="doccomment">/// Perform an ipv6 lookup with a timeout.
</span><span class="kw">pub async fn </span>lookup_ipv6&lt;N: IntoName&gt;(
</span><span class="kw">pub async fn </span>lookup_ipv6(
<span class="kw-2">&amp;</span><span class="self">self</span>,
host: N,
host: <span class="kw">impl </span>ToString,
timeout: Duration,
) -&gt; <span class="prelude-ty">Result</span>&lt;<span class="kw">impl </span>Iterator&lt;Item = IpAddr&gt;&gt; {
<span class="kw">let </span>host = host.to_string();
<span class="kw">let </span>addrs = time::timeout(timeout, <span class="self">self</span>.<span class="number">0</span>.ipv6_lookup(host)).<span class="kw">await</span><span class="question-mark">??</span>;
<span class="prelude-val">Ok</span>(addrs.into_iter().map(|ip| IpAddr::V6(ip.<span class="number">0</span>)))
}
@@ -507,11 +517,12 @@
/// `LookupIpStrategy::Ipv4AndIpv6` will wait for ipv6 resolution timeout, even if it is
/// not usable on the stack, so we manually query both lookups concurrently and time them out
/// individually.
</span><span class="kw">pub async fn </span>lookup_ipv4_ipv6&lt;N: IntoName + Clone&gt;(
</span><span class="kw">pub async fn </span>lookup_ipv4_ipv6(
<span class="kw-2">&amp;</span><span class="self">self</span>,
host: N,
host: <span class="kw">impl </span>ToString,
timeout: Duration,
) -&gt; <span class="prelude-ty">Result</span>&lt;<span class="kw">impl </span>Iterator&lt;Item = IpAddr&gt;&gt; {
<span class="kw">let </span>host = host.to_string();
<span class="kw">let </span>res = <span class="macro">tokio::join!</span>(
<span class="self">self</span>.lookup_ipv4(host.clone(), timeout),
<span class="self">self</span>.lookup_ipv6(host, timeout)
@@ -563,12 +574,13 @@
/// `delays_ms` with the first call being done immediately. `[200ms, 300ms]` results in calls
/// at T+0ms, T+200ms and T+300ms. The `timeout` is applied to each call individually. The
/// result of the first successful call is returned, or a summary of all errors otherwise.
</span><span class="kw">pub async fn </span>lookup_ipv4_staggered&lt;N: IntoName + Clone&gt;(
</span><span class="kw">pub async fn </span>lookup_ipv4_staggered(
<span class="kw-2">&amp;</span><span class="self">self</span>,
host: N,
host: <span class="kw">impl </span>ToString,
timeout: Duration,
delays_ms: <span class="kw-2">&amp;</span>[u64],
) -&gt; <span class="prelude-ty">Result</span>&lt;<span class="kw">impl </span>Iterator&lt;Item = IpAddr&gt;&gt; {
<span class="kw">let </span>host = host.to_string();
<span class="kw">let </span>f = || <span class="self">self</span>.lookup_ipv4(host.clone(), timeout);
stagger_call(f, delays_ms).<span class="kw">await
</span>}
@@ -579,12 +591,13 @@
/// `delays_ms` with the first call being done immediately. `[200ms, 300ms]` results in calls
/// at T+0ms, T+200ms and T+300ms. The `timeout` is applied to each call individually. The
/// result of the first successful call is returned, or a summary of all errors otherwise.
</span><span class="kw">pub async fn </span>lookup_ipv6_staggered&lt;N: IntoName + Clone&gt;(
</span><span class="kw">pub async fn </span>lookup_ipv6_staggered(
<span class="kw-2">&amp;</span><span class="self">self</span>,
host: N,
host: <span class="kw">impl </span>ToString,
timeout: Duration,
delays_ms: <span class="kw-2">&amp;</span>[u64],
) -&gt; <span class="prelude-ty">Result</span>&lt;<span class="kw">impl </span>Iterator&lt;Item = IpAddr&gt;&gt; {
<span class="kw">let </span>host = host.to_string();
<span class="kw">let </span>f = || <span class="self">self</span>.lookup_ipv6(host.clone(), timeout);
stagger_call(f, delays_ms).<span class="kw">await
</span>}
@@ -596,12 +609,13 @@
/// at T+0ms, T+200ms and T+300ms. The `timeout` is applied as stated in
/// [`Self::lookup_ipv4_ipv6`]. The result of the first successful call is returned, or a
/// summary of all errors otherwise.
</span><span class="kw">pub async fn </span>lookup_ipv4_ipv6_staggered&lt;N: IntoName + Clone&gt;(
</span><span class="kw">pub async fn </span>lookup_ipv4_ipv6_staggered(
<span class="kw-2">&amp;</span><span class="self">self</span>,
host: N,
host: <span class="kw">impl </span>ToString,
timeout: Duration,
delays_ms: <span class="kw-2">&amp;</span>[u64],
) -&gt; <span class="prelude-ty">Result</span>&lt;<span class="kw">impl </span>Iterator&lt;Item = IpAddr&gt;&gt; {
<span class="kw">let </span>host = host.to_string();
<span class="kw">let </span>f = || <span class="self">self</span>.lookup_ipv4_ipv6(host.clone(), timeout);
stagger_call(f, delays_ms).<span class="kw">await
</span>}
File diff suppressed because one or more lines are too long