Struct trust_dns_resolver::ResolverFuture [−][src]
pub struct ResolverFuture { /* fields omitted */ }
A Resolver for DNS records.
Methods
impl ResolverFuture
[src]
impl ResolverFuture
ⓘImportant traits for Box<R>pub fn new(
config: ResolverConfig,
options: ResolverOpts
) -> Box<Future<Item = Self, Error = ResolveError> + Send>
[src]
pub fn new(
config: ResolverConfig,
options: ResolverOpts
) -> Box<Future<Item = Self, Error = ResolveError> + Send>
Construct a new ResolverFuture with the associated Client and configuration.
Arguments
config
- configuration, name_servers, etc. for the Resolveroptions
- basic lookup options for the resolver
pub fn from_system_conf(
) -> ResolveResult<Box<Future<Item = Self, Error = ResolveError> + Send>>
[src]
pub fn from_system_conf(
) -> ResolveResult<Box<Future<Item = Self, Error = ResolveError> + Send>>
Constructs a new Resolver with the system configuration.
This will use /etc/resolv.conf
on Unix OSes and the registry on Windows.
pub fn lookup<N: IntoName>(
&self,
name: N,
record_type: RecordType
) -> LookupFuture
[src]
pub fn lookup<N: IntoName>(
&self,
name: N,
record_type: RecordType
) -> LookupFuture
Generic lookup for any RecordType
WARNING this interface may change in the future, see if one of the specializations would be better.
Arguments
name
- name of the record to lookup, if name is not a valid domain name, an error will be returnedrecord_type
- type of record to lookup, all RecordData responses will be filtered to this type
Returns
pub fn lookup_ip<N: IntoName + TryParseIp>(&self, host: N) -> LookupIpFuture
[src]
pub fn lookup_ip<N: IntoName + TryParseIp>(&self, host: N) -> LookupIpFuture
Performs a dual-stack DNS lookup for the IP for the given hostname.
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 .
, e.g. www.example.com.
, will only issue one query. Anything else will always incur the cost of querying the ResolverConfig::domain
and ResolverConfig::search
.
Arguments
host
- string hostname, if this is an invalid hostname, an error will be returned.
pub fn lookup_service(
&self,
service: &str,
protocol: &str,
name: &str
) -> SrvLookupFuture
[src]
pub fn lookup_service(
&self,
service: &str,
protocol: &str,
name: &str
) -> SrvLookupFuture
: use lookup_srv instead, this interface is none ideal
Performs a DNS lookup for an SRV record for the specified service type and protocol at the given name.
This is a convenience method over lookup_srv
, it combines the service, protocol and name into a single name: _service._protocol.name
.
Arguments
service
- service to lookup, e.g. ldap or httpprotocol
- wire protocol, e.g. udp or tcpname
- zone or other name at which the service is located.
pub fn lookup_srv<N: IntoName>(&self, name: N) -> SrvLookupFuture
[src]
pub fn lookup_srv<N: IntoName>(&self, name: N) -> SrvLookupFuture
Lookup an SRV record.
pub fn reverse_lookup(&self, query: IpAddr) -> ReverseLookupFuture
[src]
pub fn reverse_lookup(&self, query: IpAddr) -> ReverseLookupFuture
Performs a lookup for the associated type.
Arguments
query
- a type which can be converted toName
viaFrom
.
pub fn ipv4_lookup<N: IntoName>(&self, query: N) -> Ipv4LookupFuture
[src]
pub fn ipv4_lookup<N: IntoName>(&self, query: N) -> Ipv4LookupFuture
Performs a lookup for the associated type.
hint queries that end with a '.' are fully qualified names and are cheaper lookups
Arguments
query
- a string which parses to a domain name, failure to parse will return an error
pub fn ipv6_lookup<N: IntoName>(&self, query: N) -> Ipv6LookupFuture
[src]
pub fn ipv6_lookup<N: IntoName>(&self, query: N) -> Ipv6LookupFuture
Performs a lookup for the associated type.
hint queries that end with a '.' are fully qualified names and are cheaper lookups
Arguments
query
- a string which parses to a domain name, failure to parse will return an error
pub fn mx_lookup<N: IntoName>(&self, query: N) -> MxLookupFuture
[src]
pub fn mx_lookup<N: IntoName>(&self, query: N) -> MxLookupFuture
Performs a lookup for the associated type.
hint queries that end with a '.' are fully qualified names and are cheaper lookups
Arguments
query
- a string which parses to a domain name, failure to parse will return an error
pub fn srv_lookup<N: IntoName>(&self, query: N) -> SrvLookupFuture
[src]
pub fn srv_lookup<N: IntoName>(&self, query: N) -> SrvLookupFuture
Performs a lookup for the associated type.
hint queries that end with a '.' are fully qualified names and are cheaper lookups
Arguments
query
- a string which parses to a domain name, failure to parse will return an error
pub fn txt_lookup<N: IntoName>(&self, query: N) -> TxtLookupFuture
[src]
pub fn txt_lookup<N: IntoName>(&self, query: N) -> TxtLookupFuture
Performs a lookup for the associated type.
hint queries that end with a '.' are fully qualified names and are cheaper lookups
Arguments
query
- a string which parses to a domain name, failure to parse will return an error
Auto Trait Implementations
impl Send for ResolverFuture
impl Send for ResolverFuture
impl Sync for ResolverFuture
impl Sync for ResolverFuture