#[non_exhaustive]pub struct HickoryDnsResolver { /* private fields */ }
Available on crate feature
hickory-dns
and non-target_family="wasm"
only.Expand description
DNS resolver that uses [hickory_resolver] and caches DNS entries in memory.
This resolver requires a [tokio] runtime to function and isn’t available for WASM targets.
Implementations§
Source§impl HickoryDnsResolver
impl HickoryDnsResolver
Sourcepub fn builder() -> HickoryDnsResolverBuilder
pub fn builder() -> HickoryDnsResolverBuilder
Creates a new DNS resolver that caches IP addresses in memory.
Sourcepub fn clear_cache(&self)
pub fn clear_cache(&self)
Flush the cache
Trait Implementations§
Source§impl Debug for HickoryDnsResolver
impl Debug for HickoryDnsResolver
Source§impl Default for HickoryDnsResolver
impl Default for HickoryDnsResolver
Source§impl ResolveDns for HickoryDnsResolver
impl ResolveDns for HickoryDnsResolver
Source§fn resolve_dns<'a>(&'a self, name: &'a str) -> DnsFuture<'a>
fn resolve_dns<'a>(&'a self, name: &'a str) -> DnsFuture<'a>
Asynchronously resolve the given domain name
Auto Trait Implementations§
impl Freeze for HickoryDnsResolver
impl !RefUnwindSafe for HickoryDnsResolver
impl Send for HickoryDnsResolver
impl Sync for HickoryDnsResolver
impl Unpin for HickoryDnsResolver
impl !UnwindSafe for HickoryDnsResolver
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.