[][src]Trait timeout_io::DnsResolvable

pub trait DnsResolvable {
    fn try_dns_resolve(
        &self,
        timeout: Duration
    ) -> Result<SocketAddr, TimeoutIoError>; }

A trait for elements which contain a DNS-resolvable address

Required methods

fn try_dns_resolve(
    &self,
    timeout: Duration
) -> Result<SocketAddr, TimeoutIoError>

Tries to resolve a domain-name or IP-address until timeout is exceeded

Info: If you want to resolve an address like "localhost" or "crates.io" you must include the port number like this: "localhost:80" or "crates.io:443"

Warning: because getaddrinfo only provides a synchronous API, we have to resolve in a background thread. This means the background thread may outlive this call until the OS' connect-timeout is reached.

Loading content...

Implementors

impl<T: ToString> DnsResolvable for T[src]

Loading content...