Function domain::resolv::lookup::srv::lookup_srv [−][src]
pub fn lookup_srv<N>(
resolver: Resolver,
txt_service: N,
name: N,
fallback_port: u16
) -> LookupSrv where
N: AsRef<DNameSlice>,
Creates a future that looks up SRV records.
The future will use the resolver given in resolv
to query the
DNS for SRV records associated with domain name name
and service txt_service
.
If name
is a relative domain name, it is being translated into a series of
absolute names according to the resolver’s configuration.
The value returned upon success can be turned into a Stream of SRVItem
items
corresponding to the found SRV records, ordered as per the usage rules defined
in RFC 2782. If no matching SRV record is found, A/AAAA queries on the bare
domain name name
will be attempted, yielding a single element upon success.
Each of those item can be turned into an iterator over socket addresses.
The future resolves to None
whenever the request service is “decidedly not
available” at the requested domain.