Skip to main content

DnsResolver

Trait DnsResolver 

Source
pub trait DnsResolver:
    'static
    + Send
    + Sync {
    // Required method
    fn resolve<'life0, 'async_trait>(
        &'life0 self,
        host: String,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<SocketAddr>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

DNS resolver trait for resolving hostnames to IP addresses.

Required Methods§

Source

fn resolve<'life0, 'async_trait>( &'life0 self, host: String, ) -> Pin<Box<dyn Future<Output = Result<Vec<SocketAddr>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§