Struct HickoryDns
pub struct HickoryDns(/* private fields */);Expand description
DnsResolver using the hickory_resolver crate
Implementations§
§impl HickoryDns
impl HickoryDns
pub fn builder() -> HickoryDnsBuilder
pub fn builder() -> HickoryDnsBuilder
Construct a HickoryDnsBuilder used to build
a custom HickoryDns instead of the default HickoryDns::new.
pub fn new() -> HickoryDns
pub fn new() -> HickoryDns
Construct a new HickoryDns instance with the Default setup.
pub fn new_google() -> HickoryDns
pub fn new_google() -> HickoryDns
Construct a new non-shared HickoryDns instance using Google’s nameservers.
Creates a default configuration, using 8.8.8.8, 8.8.4.4 and 2001:4860:4860::8888,
2001:4860:4860::8844 (thank you, Google).
Please see Google’s privacy statement for important information about what they track, many ISP’s track similar information in DNS.
To use the system configuration see: [Self::new_system].
pub fn new_cloudflare() -> HickoryDns
pub fn new_cloudflare() -> HickoryDns
Construct a new non-shared HickoryDns instance using Cloudflare’s nameservers.
Creates a default configuration, using 1.1.1.1, 1.0.0.1 and 2606:4700:4700::1111, 2606:4700:4700::1001 (thank you, Cloudflare).
Please see: https://www.cloudflare.com/dns/
To use the system configuration see: [Self::new_system].
pub fn new_quad9() -> HickoryDns
pub fn new_quad9() -> HickoryDns
Construct a new non-shared HickoryDns instance using Quad9’s nameservers.
Creates a configuration, using 9.9.9.9, 149.112.112.112 and 2620:fe::fe, 2620:fe::fe:9,
the “secure” variants of the quad9 settings (thank you, Quad9).
Please see: https://www.quad9.net/faq/
To use the system configuration see: [Self::new_system].
pub fn try_new_system() -> Result<HickoryDns, OpaqueError>
pub fn try_new_system() -> Result<HickoryDns, OpaqueError>
Construct a new HickoryDns with the system configuration.
This will use /etc/resolv.conf on Unix OSes and the registry on Windows.
Trait Implementations§
§impl Clone for HickoryDns
impl Clone for HickoryDns
§fn clone(&self) -> HickoryDns
fn clone(&self) -> HickoryDns
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for HickoryDns
impl Debug for HickoryDns
§impl Default for HickoryDns
impl Default for HickoryDns
§fn default() -> HickoryDns
fn default() -> HickoryDns
§impl DnsResolver for HickoryDns
impl DnsResolver for HickoryDns
§type Error = OpaqueError
type Error = OpaqueError
DnsResolver§async fn txt_lookup(
&self,
domain: Domain,
) -> Result<Vec<Vec<u8>>, <HickoryDns as DnsResolver>::Error>
async fn txt_lookup( &self, domain: Domain, ) -> Result<Vec<Vec<u8>>, <HickoryDns as DnsResolver>::Error>
§async fn ipv4_lookup(
&self,
domain: Domain,
) -> Result<Vec<Ipv4Addr>, <HickoryDns as DnsResolver>::Error>
async fn ipv4_lookup( &self, domain: Domain, ) -> Result<Vec<Ipv4Addr>, <HickoryDns as DnsResolver>::Error>
§async fn ipv6_lookup(
&self,
domain: Domain,
) -> Result<Vec<Ipv6Addr>, <HickoryDns as DnsResolver>::Error>
async fn ipv6_lookup( &self, domain: Domain, ) -> Result<Vec<Ipv6Addr>, <HickoryDns as DnsResolver>::Error>
§fn boxed(self) -> BoxDnsResolver
fn boxed(self) -> BoxDnsResolver
§impl From<Resolver<GenericConnector<TokioRuntimeProvider>>> for HickoryDns
impl From<Resolver<GenericConnector<TokioRuntimeProvider>>> for HickoryDns
§fn from(value: Resolver<GenericConnector<TokioRuntimeProvider>>) -> HickoryDns
fn from(value: Resolver<GenericConnector<TokioRuntimeProvider>>) -> HickoryDns
Auto Trait Implementations§
impl Freeze for HickoryDns
impl !RefUnwindSafe for HickoryDns
impl Send for HickoryDns
impl Sync for HickoryDns
impl Unpin for HickoryDns
impl !UnwindSafe for HickoryDns
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§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> ⓘ
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> ⓘ
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 more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy that returns Action::Follow only if self and other return
Action::Follow. Read more