pub struct DotResolver { /* private fields */ }Available on not (WebAssembly and (
target_os=unknown or bare-metal)) and crate feature hickory-dns only.Expand description
A DNS-over-TLS resolver backed by hickory-resolver.
Implementations§
Source§impl DotResolver
impl DotResolver
Sourcepub fn new(host: &str) -> Self
pub fn new(host: &str) -> Self
Create a new DoT resolver from a hostname like "1.1.1.1" or "cloudflare-dns.com".
The host is resolved via the system resolver (GaiResolver) on first lookup. The default port is 853.
Sourcepub fn new_with_port(host: &str, port: u16) -> Self
pub fn new_with_port(host: &str, port: u16) -> Self
Create a new DoT resolver with a custom port.
Trait Implementations§
Source§impl Clone for DotResolver
impl Clone for DotResolver
Source§impl Debug for DotResolver
impl Debug for DotResolver
Auto Trait Implementations§
impl Freeze for DotResolver
impl !RefUnwindSafe for DotResolver
impl Send for DotResolver
impl Sync for DotResolver
impl Unpin for DotResolver
impl UnsafeUnpin for DotResolver
impl !UnwindSafe for DotResolver
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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 more