pub struct PlainDnsResolver { /* private fields */ }Available on not (WebAssembly and (
target_os=unknown or bare-metal)) and crate feature hickory-dns only.Expand description
A plain DNS (UDP/TCP) resolver backed by hickory-resolver.
Queries the specified DNS server directly using standard UDP/TCP on port 53.
Implementations§
Source§impl PlainDnsResolver
impl PlainDnsResolver
Sourcepub fn new(host: &str) -> Self
pub fn new(host: &str) -> Self
Create a new plain DNS resolver for a given host.
The host can be an IP address ("1.1.1.1") or a hostname ("resolver.example.com").
The default port is 53.
Sourcepub fn new_with_port(host: &str, port: u16) -> Self
pub fn new_with_port(host: &str, port: u16) -> Self
Create a new plain DNS resolver with a custom port.
Trait Implementations§
Source§impl Clone for PlainDnsResolver
impl Clone for PlainDnsResolver
Source§impl Debug for PlainDnsResolver
impl Debug for PlainDnsResolver
Auto Trait Implementations§
impl Freeze for PlainDnsResolver
impl !RefUnwindSafe for PlainDnsResolver
impl Send for PlainDnsResolver
impl Sync for PlainDnsResolver
impl Unpin for PlainDnsResolver
impl UnsafeUnpin for PlainDnsResolver
impl !UnwindSafe for PlainDnsResolver
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