Trait apisdk::DnsResolver
source · pub trait DnsResolver: 'static + Send + Sync {
// Required method
fn resolve<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = Option<SocketAddrs>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided methods
fn get_scheme(&self) -> Option<&str> { ... }
fn get_port(&self) -> Option<u16> { ... }
}
Expand description
This trait is used to performing DNS queries
Required Methods§
Provided Methods§
sourcefn get_scheme(&self) -> Option<&str>
fn get_scheme(&self) -> Option<&str>
Return Some
if scheme should be changed
Trait Implementations§
source§impl DnsResolver for Box<dyn DnsResolver>
impl DnsResolver for Box<dyn DnsResolver>
source§fn resolve<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = Option<SocketAddrs>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn resolve<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = Option<SocketAddrs>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Do DNS queries
source§fn get_scheme(&self) -> Option<&str>
fn get_scheme(&self) -> Option<&str>
Return
Some
if scheme should be changed