Struct HickoryDnsResolver
pub struct HickoryDnsResolver(/* private fields */);Expand description
DNS Resolver using the hickory_resolver crate
Implementations§
§impl HickoryDnsResolver
impl HickoryDnsResolver
pub fn builder() -> HickoryDnsBuilder
pub fn builder() -> HickoryDnsBuilder
Construct a HickoryDnsBuilder used to build
a custom HickoryDnsResolver instead of the default HickoryDnsResolver::new.
pub fn new() -> HickoryDnsResolver
pub fn new() -> HickoryDnsResolver
Construct a new HickoryDnsResolver instance with the Default setup.
pub fn new_google() -> HickoryDnsResolver
pub fn new_google() -> HickoryDnsResolver
Construct a new non-shared HickoryDnsResolver 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::try_new_system.
pub fn new_cloudflare() -> HickoryDnsResolver
pub fn new_cloudflare() -> HickoryDnsResolver
Construct a new non-shared HickoryDnsResolver 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::try_new_system.
pub fn new_quad9() -> HickoryDnsResolver
pub fn new_quad9() -> HickoryDnsResolver
Construct a new non-shared HickoryDnsResolver 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::try_new_system.
pub fn try_new_system() -> Result<HickoryDnsResolver, Box<dyn Error + Send + Sync>>
pub fn try_new_system() -> Result<HickoryDnsResolver, Box<dyn Error + Send + Sync>>
Construct a new HickoryDnsResolver with the system configuration.
This will use /etc/resolv.conf on Unix OSes and the registry on Windows.
Trait Implementations§
§impl Clone for HickoryDnsResolver
impl Clone for HickoryDnsResolver
§fn clone(&self) -> HickoryDnsResolver
fn clone(&self) -> HickoryDnsResolver
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for HickoryDnsResolver
impl Debug for HickoryDnsResolver
§impl Default for HickoryDnsResolver
impl Default for HickoryDnsResolver
§fn default() -> HickoryDnsResolver
fn default() -> HickoryDnsResolver
§impl DnsAddressResolver for HickoryDnsResolver
impl DnsAddressResolver for HickoryDnsResolver
§fn lookup_ipv4(
&self,
domain: Domain,
) -> impl Stream<Item = Result<Ipv4Addr, Box<dyn Error + Send + Sync>>> + Send
fn lookup_ipv4( &self, domain: Domain, ) -> impl Stream<Item = Result<Ipv4Addr, Box<dyn Error + Send + Sync>>> + Send
§fn lookup_ipv6(
&self,
domain: Domain,
) -> impl Stream<Item = Result<Ipv6Addr, Box<dyn Error + Send + Sync>>> + Send
fn lookup_ipv6( &self, domain: Domain, ) -> impl Stream<Item = Result<Ipv6Addr, Box<dyn Error + Send + Sync>>> + Send
§fn lookup_ipv4_first(
&self,
domain: Domain,
) -> impl Future<Output = Option<Result<Ipv4Addr, Self::Error>>> + Send
fn lookup_ipv4_first( &self, domain: Domain, ) -> impl Future<Output = Option<Result<Ipv4Addr, Self::Error>>> + Send
§fn lookup_ipv4_rand(
&self,
domain: Domain,
) -> impl Future<Output = Option<Result<Ipv4Addr, Self::Error>>> + Send
fn lookup_ipv4_rand( &self, domain: Domain, ) -> impl Future<Output = Option<Result<Ipv4Addr, Self::Error>>> + Send
§fn lookup_ipv6_first(
&self,
domain: Domain,
) -> impl Future<Output = Option<Result<Ipv6Addr, Self::Error>>> + Send
fn lookup_ipv6_first( &self, domain: Domain, ) -> impl Future<Output = Option<Result<Ipv6Addr, Self::Error>>> + Send
§fn lookup_ipv6_rand(
&self,
domain: Domain,
) -> impl Future<Output = Option<Result<Ipv6Addr, Self::Error>>> + Send
fn lookup_ipv6_rand( &self, domain: Domain, ) -> impl Future<Output = Option<Result<Ipv6Addr, Self::Error>>> + Send
§fn into_box_dns_address_resolver(self) -> BoxDnsAddressResolver
fn into_box_dns_address_resolver(self) -> BoxDnsAddressResolver
§impl DnsResolver for HickoryDnsResolver
impl DnsResolver for HickoryDnsResolver
fn into_box_dns_resolver(self) -> BoxDnsResolverwhere
Self: Sized,
§impl DnsTxtResolver for HickoryDnsResolver
impl DnsTxtResolver for HickoryDnsResolver
§fn lookup_txt(
&self,
domain: Domain,
) -> impl Stream<Item = Result<Bytes, <HickoryDnsResolver as DnsTxtResolver>::Error>> + Send
fn lookup_txt( &self, domain: Domain, ) -> impl Stream<Item = Result<Bytes, <HickoryDnsResolver as DnsTxtResolver>::Error>> + Send
§fn into_box_dns_txt_resolver(self) -> BoxDnsTxtResolver
fn into_box_dns_txt_resolver(self) -> BoxDnsTxtResolver
§impl From<Resolver<GenericConnector<TokioRuntimeProvider>>> for HickoryDnsResolver
impl From<Resolver<GenericConnector<TokioRuntimeProvider>>> for HickoryDnsResolver
§fn from(
value: Resolver<GenericConnector<TokioRuntimeProvider>>,
) -> HickoryDnsResolver
fn from( value: Resolver<GenericConnector<TokioRuntimeProvider>>, ) -> HickoryDnsResolver
Auto Trait Implementations§
impl Freeze for HickoryDnsResolver
impl !RefUnwindSafe for HickoryDnsResolver
impl Send for HickoryDnsResolver
impl Sync for HickoryDnsResolver
impl Unpin for HickoryDnsResolver
impl UnsafeUnpin for HickoryDnsResolver
impl !UnwindSafe for HickoryDnsResolver
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a rama_grpc::Request§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