pub struct ResolverConfig { /* private fields */ }Expand description
Encrypted DNS resolver configuration.
Implementations§
Source§impl ResolverConfig
impl ResolverConfig
Sourcepub fn dns_over_https(url: &str) -> Result<Self, NetworkError>
pub fn dns_over_https(url: &str) -> Result<Self, NetworkError>
Create a DNS-over-HTTPS resolver from a URL template.
Sourcepub fn dns_over_tls(host: &str, port: u16) -> Result<Self, NetworkError>
pub fn dns_over_tls(host: &str, port: u16) -> Result<Self, NetworkError>
Create a DNS-over-TLS resolver from a host and port.
Sourcepub fn add_server_address(
&mut self,
address: &str,
port: u16,
) -> Result<&mut Self, NetworkError>
pub fn add_server_address( &mut self, address: &str, port: u16, ) -> Result<&mut Self, NetworkError>
Add a DNS server address to the resolver configuration.
Trait Implementations§
Source§impl Clone for ResolverConfig
impl Clone for ResolverConfig
Source§impl Debug for ResolverConfig
impl Debug for ResolverConfig
Source§impl Drop for ResolverConfig
impl Drop for ResolverConfig
impl Send for ResolverConfig
impl Sync for ResolverConfig
Auto Trait Implementations§
impl Freeze for ResolverConfig
impl RefUnwindSafe for ResolverConfig
impl Unpin for ResolverConfig
impl UnsafeUnpin for ResolverConfig
impl UnwindSafe for ResolverConfig
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