Struct hyper_dns::DnsConnector
[−]
[src]
pub struct DnsConnector<C: NetworkConnector> { /* fields omitted */ }
A connector that wraps another connector and provides custom DNS resolution.
Methods
impl<C: NetworkConnector> DnsConnector<C>
[src]
fn new(dns_addr: SocketAddr, connector: C) -> DnsConnector<C>
fn new_with_resolve_type(
dns_addr: SocketAddr,
connector: C,
record_type: RecordType
) -> DnsConnector<C>
dns_addr: SocketAddr,
connector: C,
record_type: RecordType
) -> DnsConnector<C>
Trait Implementations
impl<C: Debug + NetworkConnector> Debug for DnsConnector<C>
[src]
impl<C: Clone + NetworkConnector> Clone for DnsConnector<C>
[src]
fn clone(&self) -> DnsConnector<C>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<C: NetworkConnector<Stream = S>, S: NetworkStream + Send> NetworkConnector for DnsConnector<C>
[src]
type Stream = S
Type of Stream
to create
fn connect(&self, host: &str, port: u16, scheme: &str) -> Result<S>
Performs DNS SRV resolution, then calls into the inner connector with the results. Note that currently this does not take into account the following in the SRV record: * weight * priority It just takes a random entry in the DNS answers that are returned.