pub trait ToSocketAddrs<T: GetSocketAddrs> {
// Required method
fn to_socket_addrs(&self, get: &T) -> Result<OneOrMany<T::Iter>, T::Error>;
}Expand description
Retrive the addresses associated with a hostname.
To use this, you must pass in a type that implements GetSocketAddrs.
Required Methods§
Sourcefn to_socket_addrs(&self, get: &T) -> Result<OneOrMany<T::Iter>, T::Error>
fn to_socket_addrs(&self, get: &T) -> Result<OneOrMany<T::Iter>, T::Error>
Converts this object to an iterator of resolved SocketAddrs.
The returned iterator may not actually yield any values depending on the outcome of any resolution performed.
Note that this function may block the current thread while resolution is performed.