Files
mercator_service/actix_connect/struct.AsyncResolver.html

110 lines
42 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!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="API documentation for the Rust `AsyncResolver` struct in crate `actix_connect`."><meta name="keywords" content="rust, rustlang, rust-lang, AsyncResolver"><title>actix_connect::AsyncResolver - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../dark.css"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../actix_connect/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Struct AsyncResolver</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.from_system_conf">from_system_conf</a><a href="#method.ipv4_lookup">ipv4_lookup</a><a href="#method.ipv6_lookup">ipv6_lookup</a><a href="#method.lookup">lookup</a><a href="#method.lookup_ip">lookup_ip</a><a href="#method.lookup_service">lookup_service</a><a href="#method.lookup_srv">lookup_srv</a><a href="#method.mx_lookup">mx_lookup</a><a href="#method.new">new</a><a href="#method.reverse_lookup">reverse_lookup</a><a href="#method.srv_lookup">srv_lookup</a><a href="#method.txt_lookup">txt_lookup</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">!RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">!UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><p class='location'><a href='index.html'>actix_connect</a></p><script>window.sidebarCurrent = {name: 'AsyncResolver', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../src/trust_dns_resolver/async_resolver/mod.rs.html#59-61' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='index.html'>actix_connect</a>::<wbr><a class="struct" href=''>AsyncResolver</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct AsyncResolver { /* fields omitted */ }</pre></div><div class='docblock'><p>A handle for resolving DNS records.</p>
<p>Creating a <code>AsyncResolver</code> returns a new handle and a future that should
be spawned on an executor to drive the background work. The lookup methods
on <code>AsyncResolver</code> request lookups from the background task.</p>
<p>The futures returned by a <code>AsyncResolver</code> and the corresponding background
task need not be spawned on the same executor, or be in the same thread.
Additionally, one background task may have any number of handles; calling
<code>clone()</code> on a handle will create a new handle linked to the same
background task.</p>
<p><em>NOTE</em> If lookup futures returned by a <code>AsyncResolver</code> and the background
future are spawned on two separate <code>CurrentThread</code> executors, one thread
cannot run both executors simultaneously, so the <code>run</code> or <code>block_on</code>
functions will cause the thread to deadlock. If both the background work
and the lookup futures are intended to be run on the same thread, they
should be spawned on the same executor.</p>
<p>The background task manages the name server pool and other state used
to drive lookups. When this future is spawned on an executor, it will
first construct and configure the necessary client state, before checking
for any incoming lookup requests, handling them, and and yielding. It will
continue to do so as long as there are still any [<code>AsyncResolver</code>] handle
linked to it. When all of its [<code>AsyncResolver</code>]s have been dropped, the
background future will finish.</p>
</div><h2 id='methods' class='small-section-header'>Methods<a href='#methods' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl <a class="struct" href="../actix_connect/struct.AsyncResolver.html" title="struct actix_connect::AsyncResolver">AsyncResolver</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../src/trust_dns_resolver/async_resolver/mod.rs.html#143-320' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.new' class="method"><code id='new.v'>pub fn <a href='#method.new' class='fnname'>new</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;config: <a class="struct" href="../actix_connect/struct.ResolverConfig.html" title="struct actix_connect::ResolverConfig">ResolverConfig</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;options: <a class="struct" href="../actix_connect/struct.ResolverOpts.html" title="struct actix_connect::ResolverOpts">ResolverOpts</a><br>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../actix_connect/struct.AsyncResolver.html" title="struct actix_connect::AsyncResolver">AsyncResolver</a>, impl <a class="trait" href="../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>&lt;Item = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, Error = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/trust_dns_resolver/async_resolver/mod.rs.html#157-165' title='goto source code'>[src]</a></h4><div class='docblock'><p>Construct a new <code>AsyncResolver</code> with the provided configuration.</p>
<h1 id="arguments" class="section-header"><a href="#arguments">Arguments</a></h1>
<ul>
<li><code>config</code> - configuration, name_servers, etc. for the Resolver</li>
<li><code>options</code> - basic lookup options for the resolver</li>
</ul>
<h1 id="returns" class="section-header"><a href="#returns">Returns</a></h1>
<p>A tuple containing the new <code>AsyncResolver</code> and a future that drives the
background task that runs resolutions for the <code>AsyncResolver</code>. See the
documentation for <code>AsyncResolver</code> for more information on how to use
the background future.</p>
</div><h4 id='method.from_system_conf' class="method"><code id='from_system_conf.v'>pub fn <a href='#method.from_system_conf' class='fnname'>from_system_conf</a>(<br>) -&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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../actix_connect/struct.AsyncResolver.html" title="struct actix_connect::AsyncResolver">AsyncResolver</a>, impl <a class="trait" href="../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>&lt;Item = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, Error = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>, <a class="struct" href="../actix_connect/struct.ResolveError.html" title="struct actix_connect::ResolveError">ResolveError</a>&gt;</code><a class='srclink' href='../src/trust_dns_resolver/async_resolver/mod.rs.html#196-199' title='goto source code'>[src]</a></h4><div class='docblock'><p>Constructs a new Resolver with the system configuration.</p>
<p>This will use <code>/etc/resolv.conf</code> on Unix OSes and the registry on Windows.</p>
</div><h4 id='method.lookup' class="method"><code id='lookup.v'>pub fn <a href='#method.lookup' class='fnname'>lookup</a>&lt;N&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: N, <br>&nbsp;&nbsp;&nbsp;&nbsp;record_type: <a class="enum" href="../trust_dns_proto/rr/record_type/enum.RecordType.html" title="enum trust_dns_proto::rr::record_type::RecordType">RecordType</a><br>) -&gt; <a class="struct" href="../trust_dns_resolver/async_resolver/struct.Background.html" title="struct trust_dns_resolver::async_resolver::Background">Background</a>&lt;LookupFuture&lt;LookupEither&lt;ConnectionHandle, StandardConnection&gt;&gt;, LookupFuture&lt;LookupEither&lt;ConnectionHandle, StandardConnection&gt;&gt;&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;N: <a class="trait" href="../trust_dns_proto/rr/domain/name/trait.IntoName.html" title="trait trust_dns_proto::rr::domain::name::IntoName">IntoName</a>,&nbsp;</span></code><a class='srclink' href='../src/trust_dns_resolver/async_resolver/mod.rs.html#213-220' title='goto source code'>[src]</a></h4><div class='docblock'><p>Generic lookup for any RecordType</p>
<p><em>WARNING</em> this interface may change in the future, see if one of the specializations would be better.</p>
<h1 id="arguments-1" class="section-header"><a href="#arguments-1">Arguments</a></h1>
<ul>
<li><code>name</code> - name of the record to lookup, if name is not a valid domain name, an error will be returned</li>
<li><code>record_type</code> - type of record to lookup, all RecordData responses will be filtered to this type</li>
</ul>
<h1 id="returns-1" class="section-header"><a href="#returns-1">Returns</a></h1></div><h4 id='method.lookup_ip' class="method"><code id='lookup_ip.v'>pub fn <a href='#method.lookup_ip' class='fnname'>lookup_ip</a>&lt;N&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;host: N<br>) -&gt; <a class="struct" href="../trust_dns_resolver/async_resolver/struct.Background.html" title="struct trust_dns_resolver::async_resolver::Background">Background</a>&lt;<a class="struct" href="../trust_dns_resolver/lookup_ip/struct.LookupIpFuture.html" title="struct trust_dns_resolver::lookup_ip::LookupIpFuture">LookupIpFuture</a>&lt;LookupEither&lt;ConnectionHandle, StandardConnection&gt;&gt;, <a class="struct" href="../trust_dns_resolver/lookup_ip/struct.LookupIpFuture.html" title="struct trust_dns_resolver::lookup_ip::LookupIpFuture">LookupIpFuture</a>&lt;LookupEither&lt;ConnectionHandle, StandardConnection&gt;&gt;&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;N: <a class="trait" href="../trust_dns_proto/rr/domain/name/trait.IntoName.html" title="trait trust_dns_proto::rr::domain::name::IntoName">IntoName</a> + <a class="trait" href="../trust_dns_proto/rr/domain/try_parse_ip/trait.TryParseIp.html" title="trait trust_dns_proto::rr::domain::try_parse_ip::TryParseIp">TryParseIp</a>,&nbsp;</span></code><a class='srclink' href='../src/trust_dns_resolver/async_resolver/mod.rs.html#258-276' title='goto source code'>[src]</a></h4><div class='docblock'><p>Performs a dual-stack DNS lookup for the IP for the given hostname.</p>
<p>See the configuration and options parameters for controlling the way in which A(Ipv4) and AAAA(Ipv6) lookups will be performed. For the least expensive query a fully-qualified-domain-name, FQDN, which ends in a final <code>.</code>, e.g. <code>www.example.com.</code>, will only issue one query. Anything else will always incur the cost of querying the <code>ResolverConfig::domain</code> and <code>ResolverConfig::search</code>.</p>
<h1 id="arguments-2" class="section-header"><a href="#arguments-2">Arguments</a></h1>
<ul>
<li><code>host</code> - string hostname, if this is an invalid hostname, an error will be returned.</li>
</ul>
</div><h4 id='method.lookup_service' class="method"><code id='lookup_service.v'>pub fn <a href='#method.lookup_service' class='fnname'>lookup_service</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;service: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;protocol: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; <a class="struct" href="../trust_dns_resolver/async_resolver/struct.Background.html" title="struct trust_dns_resolver::async_resolver::Background">Background</a>&lt;LookupFuture&lt;LookupEither&lt;ConnectionHandle, StandardConnection&gt;&gt;, <a class="struct" href="../trust_dns_resolver/lookup/struct.SrvLookupFuture.html" title="struct trust_dns_resolver::lookup::SrvLookupFuture">SrvLookupFuture</a>&gt;</code><a class='srclink' href='../src/trust_dns_resolver/async_resolver/mod.rs.html#288-296' title='goto source code'>[src]</a></h4><div class='stability'><div class='stab deprecated'>Deprecated: <p>use lookup_srv instead, this interface is none ideal</p>
</div></div><div class='docblock'><p>Performs a DNS lookup for an SRV record for the specified service type and protocol at the given name.</p>
<p>This is a convenience method over <code>lookup_srv</code>, it combines the service, protocol and name into a single name: <code>_service._protocol.name</code>.</p>
<h1 id="arguments-3" class="section-header"><a href="#arguments-3">Arguments</a></h1>
<ul>
<li><code>service</code> - service to lookup, e.g. ldap or http</li>
<li><code>protocol</code> - wire protocol, e.g. udp or tcp</li>
<li><code>name</code> - zone or other name at which the service is located.</li>
</ul>
</div><h4 id='method.lookup_srv' class="method"><code id='lookup_srv.v'>pub fn <a href='#method.lookup_srv' class='fnname'>lookup_srv</a>&lt;N&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: N<br>) -&gt; <a class="struct" href="../trust_dns_resolver/async_resolver/struct.Background.html" title="struct trust_dns_resolver::async_resolver::Background">Background</a>&lt;LookupFuture&lt;LookupEither&lt;ConnectionHandle, StandardConnection&gt;&gt;, <a class="struct" href="../trust_dns_resolver/lookup/struct.SrvLookupFuture.html" title="struct trust_dns_resolver::lookup::SrvLookupFuture">SrvLookupFuture</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;N: <a class="trait" href="../trust_dns_proto/rr/domain/name/trait.IntoName.html" title="trait trust_dns_proto::rr::domain::name::IntoName">IntoName</a>,&nbsp;</span></code><a class='srclink' href='../src/trust_dns_resolver/async_resolver/mod.rs.html#299-306' title='goto source code'>[src]</a></h4><div class='docblock'><p>Lookup an SRV record.</p>
</div><h4 id='method.reverse_lookup' class="method"><code id='reverse_lookup.v'>pub fn <a href='#method.reverse_lookup' class='fnname'>reverse_lookup</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;query: <a class="enum" href="https://doc.rust-lang.org/nightly/std/net/ip/enum.IpAddr.html" title="enum std::net::ip::IpAddr">IpAddr</a><br>) -&gt; <a class="struct" href="../trust_dns_resolver/async_resolver/struct.Background.html" title="struct trust_dns_resolver::async_resolver::Background">Background</a>&lt;LookupFuture&lt;LookupEither&lt;ConnectionHandle, StandardConnection&gt;&gt;, <a class="struct" href="../trust_dns_resolver/lookup/struct.ReverseLookupFuture.html" title="struct trust_dns_resolver::lookup::ReverseLookupFuture">ReverseLookupFuture</a>&gt;</code><a class='srclink' href='../src/trust_dns_resolver/async_resolver/mod.rs.html#136-139' title='goto source code'>[src]</a></h4><div class='docblock'><p>Performs a lookup for the associated type.</p>
<h1 id="arguments-4" class="section-header"><a href="#arguments-4">Arguments</a></h1>
<ul>
<li><code>query</code> - a type which can be converted to <code>Name</code> via <code>From</code>.</li>
</ul>
</div><h4 id='method.ipv4_lookup' class="method"><code id='ipv4_lookup.v'>pub fn <a href='#method.ipv4_lookup' class='fnname'>ipv4_lookup</a>&lt;N&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;query: N<br>) -&gt; <a class="struct" href="../trust_dns_resolver/async_resolver/struct.Background.html" title="struct trust_dns_resolver::async_resolver::Background">Background</a>&lt;LookupFuture&lt;LookupEither&lt;ConnectionHandle, StandardConnection&gt;&gt;, <a class="struct" href="../trust_dns_resolver/lookup/struct.Ipv4LookupFuture.html" title="struct trust_dns_resolver::lookup::Ipv4LookupFuture">Ipv4LookupFuture</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;N: <a class="trait" href="../trust_dns_proto/rr/domain/name/trait.IntoName.html" title="trait trust_dns_proto::rr::domain::name::IntoName">IntoName</a>,&nbsp;</span></code><a class='srclink' href='../src/trust_dns_resolver/async_resolver/mod.rs.html#119-128' title='goto source code'>[src]</a></h4><div class='docblock'><p>Performs a lookup for the associated type.</p>
<p><em>hint</em> queries that end with a '.' are fully qualified names and are cheaper lookups</p>
<h1 id="arguments-5" class="section-header"><a href="#arguments-5">Arguments</a></h1>
<ul>
<li><code>query</code> - a string which parses to a domain name, failure to parse will return an error</li>
</ul>
</div><h4 id='method.ipv6_lookup' class="method"><code id='ipv6_lookup.v'>pub fn <a href='#method.ipv6_lookup' class='fnname'>ipv6_lookup</a>&lt;N&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;query: N<br>) -&gt; <a class="struct" href="../trust_dns_resolver/async_resolver/struct.Background.html" title="struct trust_dns_resolver::async_resolver::Background">Background</a>&lt;LookupFuture&lt;LookupEither&lt;ConnectionHandle, StandardConnection&gt;&gt;, <a class="struct" href="../trust_dns_resolver/lookup/struct.Ipv6LookupFuture.html" title="struct trust_dns_resolver::lookup::Ipv6LookupFuture">Ipv6LookupFuture</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;N: <a class="trait" href="../trust_dns_proto/rr/domain/name/trait.IntoName.html" title="trait trust_dns_proto::rr::domain::name::IntoName">IntoName</a>,&nbsp;</span></code><a class='srclink' href='../src/trust_dns_resolver/async_resolver/mod.rs.html#119-128' title='goto source code'>[src]</a></h4><div class='docblock'><p>Performs a lookup for the associated type.</p>
<p><em>hint</em> queries that end with a '.' are fully qualified names and are cheaper lookups</p>
<h1 id="arguments-6" class="section-header"><a href="#arguments-6">Arguments</a></h1>
<ul>
<li><code>query</code> - a string which parses to a domain name, failure to parse will return an error</li>
</ul>
</div><h4 id='method.mx_lookup' class="method"><code id='mx_lookup.v'>pub fn <a href='#method.mx_lookup' class='fnname'>mx_lookup</a>&lt;N&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;query: N<br>) -&gt; <a class="struct" href="../trust_dns_resolver/async_resolver/struct.Background.html" title="struct trust_dns_resolver::async_resolver::Background">Background</a>&lt;LookupFuture&lt;LookupEither&lt;ConnectionHandle, StandardConnection&gt;&gt;, <a class="struct" href="../trust_dns_resolver/lookup/struct.MxLookupFuture.html" title="struct trust_dns_resolver::lookup::MxLookupFuture">MxLookupFuture</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;N: <a class="trait" href="../trust_dns_proto/rr/domain/name/trait.IntoName.html" title="trait trust_dns_proto::rr::domain::name::IntoName">IntoName</a>,&nbsp;</span></code><a class='srclink' href='../src/trust_dns_resolver/async_resolver/mod.rs.html#119-128' title='goto source code'>[src]</a></h4><div class='docblock'><p>Performs a lookup for the associated type.</p>
<p><em>hint</em> queries that end with a '.' are fully qualified names and are cheaper lookups</p>
<h1 id="arguments-7" class="section-header"><a href="#arguments-7">Arguments</a></h1>
<ul>
<li><code>query</code> - a string which parses to a domain name, failure to parse will return an error</li>
</ul>
</div><h4 id='method.srv_lookup' class="method"><code id='srv_lookup.v'>pub fn <a href='#method.srv_lookup' class='fnname'>srv_lookup</a>&lt;N&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;query: N<br>) -&gt; <a class="struct" href="../trust_dns_resolver/async_resolver/struct.Background.html" title="struct trust_dns_resolver::async_resolver::Background">Background</a>&lt;LookupFuture&lt;LookupEither&lt;ConnectionHandle, StandardConnection&gt;&gt;, <a class="struct" href="../trust_dns_resolver/lookup/struct.SrvLookupFuture.html" title="struct trust_dns_resolver::lookup::SrvLookupFuture">SrvLookupFuture</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;N: <a class="trait" href="../trust_dns_proto/rr/domain/name/trait.IntoName.html" title="trait trust_dns_proto::rr::domain::name::IntoName">IntoName</a>,&nbsp;</span></code><a class='srclink' href='../src/trust_dns_resolver/async_resolver/mod.rs.html#119-128' title='goto source code'>[src]</a></h4><div class='docblock'><p>Performs a lookup for the associated type.</p>
<p><em>hint</em> queries that end with a '.' are fully qualified names and are cheaper lookups</p>
<h1 id="arguments-8" class="section-header"><a href="#arguments-8">Arguments</a></h1>
<ul>
<li><code>query</code> - a string which parses to a domain name, failure to parse will return an error</li>
</ul>
</div><h4 id='method.txt_lookup' class="method"><code id='txt_lookup.v'>pub fn <a href='#method.txt_lookup' class='fnname'>txt_lookup</a>&lt;N&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;query: N<br>) -&gt; <a class="struct" href="../trust_dns_resolver/async_resolver/struct.Background.html" title="struct trust_dns_resolver::async_resolver::Background">Background</a>&lt;LookupFuture&lt;LookupEither&lt;ConnectionHandle, StandardConnection&gt;&gt;, <a class="struct" href="../trust_dns_resolver/lookup/struct.TxtLookupFuture.html" title="struct trust_dns_resolver::lookup::TxtLookupFuture">TxtLookupFuture</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;N: <a class="trait" href="../trust_dns_proto/rr/domain/name/trait.IntoName.html" title="trait trust_dns_proto::rr::domain::name::IntoName">IntoName</a>,&nbsp;</span></code><a class='srclink' href='../src/trust_dns_resolver/async_resolver/mod.rs.html#119-128' title='goto source code'>[src]</a></h4><div class='docblock'><p>Performs a lookup for the associated type.</p>
<p><em>hint</em> queries that end with a '.' are fully qualified names and are cheaper lookups</p>
<h1 id="arguments-9" class="section-header"><a href="#arguments-9">Arguments</a></h1>
<ul>
<li><code>query</code> - a string which parses to a domain name, failure to parse will return an error</li>
</ul>
</div></div><h2 id='implementations' class='small-section-header'>Trait Implementations<a href='#implementations' class='anchor'></a></h2><div id='implementations-list'><h3 id='impl-Clone' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../actix_connect/struct.AsyncResolver.html" title="struct actix_connect::AsyncResolver">AsyncResolver</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../src/trust_dns_resolver/async_resolver/mod.rs.html#58' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code id='clone.v'>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class="struct" href="../actix_connect/struct.AsyncResolver.html" title="struct actix_connect::AsyncResolver">AsyncResolver</a></code><a class='srclink' href='../src/trust_dns_resolver/async_resolver/mod.rs.html#58' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div><h4 id='method.clone_from' class="method hidden"><code id='clone_from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self)</code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/clone.rs.html#131-133' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></div><h3 id='impl-Debug' class='impl'><code class='in-band'>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="../actix_connect/struct.AsyncResolver.html" title="struct actix_connect::AsyncResolver">AsyncResolver</a></code><a href='#impl-Debug' class='anchor'></a><a class='srclink' href='../src/trust_dns_resolver/async_resolver/mod.rs.html#322-331' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt' class="method hidden"><code id='fmt.v'>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>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>) -&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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>&gt;</code><a class='srclink' href='../src/trust_dns_resolver/async_resolver/mod.rs.html#323-330' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>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></p>
</div></div></div><h2 id='synthetic-implementations' class='small-section-header'>Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a></h2><div id='synthetic-implementations-list'><h3 id='impl-RefUnwindSafe' class='impl'><code class='in-band'>impl !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../actix_connect/struct.AsyncResolver.html" title="struct actix_connect::AsyncResolver">AsyncResolver</a></code><a href='#impl-RefUnwindSafe' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Send' class='impl'><code class='in-band'>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="../actix_connect/struct.AsyncResolver.html" title="struct actix_connect::AsyncResolver">AsyncResolver</a></code><a href='#impl-Send' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><code class='in-band'>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="../actix_connect/struct.AsyncResolver.html" title="struct actix_connect::AsyncResolver">AsyncResolver</a></code><a href='#impl-Sync' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Unpin' class='impl'><code class='in-band'>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="../actix_connect/struct.AsyncResolver.html" title="struct actix_connect::AsyncResolver">AsyncResolver</a></code><a href='#impl-Unpin' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-UnwindSafe' class='impl'><code class='in-band'>impl !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../actix_connect/struct.AsyncResolver.html" title="struct actix_connect::AsyncResolver">AsyncResolver</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-Any' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code id='type_id.v'>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>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></p>
</div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Borrow%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213-217' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code id='borrow.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214-216' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3 id='impl-BorrowMut%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-BorrowMut%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#220-224' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow_mut' class="method hidden"><code id='borrow_mut.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut' class='fnname'>borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#221-223' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
</div></div><h3 id='impl-From%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</code><a href='#impl-From%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#564-568' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from' class="method hidden"><code id='from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(t: T) -&gt; T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#565-567' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-Into%3CU%3E' class='impl'><code class='in-band'>impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,&nbsp;</span></code><a href='#impl-Into%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#553-560' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.into' class="method hidden"><code id='into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into' class='fnname'>into</a>(self) -&gt; U</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#557-559' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-ToOwned' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,&nbsp;</span></code><a href='#impl-ToOwned' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#80-92' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Owned' class="type"><code id='Owned.t'>type <a href='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#associatedtype.Owned' class="type">Owned</a> = T</code></h4><div class='docblock'><p>The resulting type after obtaining ownership.</p>
</div><h4 id='method.to_owned' class="method hidden"><code id='to_owned.v'>fn <a href='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned' class='fnname'>to_owned</a>(&amp;self) -&gt; T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#85-87' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></p>
</div><h4 id='method.clone_into' class="method hidden"><code id='clone_into.v'>fn <a href='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into' class='fnname'>clone_into</a>(&amp;self, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T)</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#89-91' title='goto source code'>[src]</a></h4><div class='stability hidden'><div class='stab unstable'><details><summary><span class='emoji'>🔬</span> This is a nightly-only experimental API. (<code>toowned_clone_into</code>)</summary><p>recently added</p>
</details></div></div><div class='docblock hidden'><p>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></p>
</div></div><h3 id='impl-TryFrom%3CU%3E' class='impl'><code class='in-band'>impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,&nbsp;</span></code><a href='#impl-TryFrom%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#601-610' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error' class="type"><code id='Error.t'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error' class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4 id='method.try_from' class="method hidden"><code id='try_from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from' class='fnname'>try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#607-609' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-TryInto%3CU%3E' class='impl'><code class='in-band'>impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,&nbsp;</span></code><a href='#impl-TryInto%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#587-596' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-1' class="type"><code id='Error.t-1'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error' class="type">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4 id='method.try_into' class="method hidden"><code id='try_into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into' class='fnname'>try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#593-595' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "actix_connect";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>