Struct mtop_client::dns::DnsClient
source · pub struct DnsClient { /* private fields */ }Implementations§
source§impl DnsClient
impl DnsClient
sourcepub fn new(config: DnsClientConfig) -> Self
pub fn new(config: DnsClientConfig) -> Self
Create a new DnsClient that will resolve names using UDP or TCP connections and behavior based on a resolv.conf configuration file.
sourcepub async fn resolve(
&self,
name: Name,
rtype: RecordType,
rclass: RecordClass,
) -> Result<Message, MtopError>
pub async fn resolve( &self, name: Name, rtype: RecordType, rclass: RecordClass, ) -> Result<Message, MtopError>
Perform a DNS lookup with the configured nameservers.
Timeouts and network errors will result in up to one additional attempt to perform a DNS lookup when using the default configuration.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for DnsClient
impl !RefUnwindSafe for DnsClient
impl Send for DnsClient
impl Sync for DnsClient
impl Unpin for DnsClient
impl !UnwindSafe for DnsClient
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more