pub struct DnsBuilder { /* private fields */ }Expand description
Fluent builder for DnsConfig.
Implementations§
Source§impl DnsBuilder
impl DnsBuilder
Sourcepub fn rebind_protection(self, enabled: bool) -> Self
pub fn rebind_protection(self, enabled: bool) -> Self
Enable or disable DNS rebinding protection. Default: true.
Sourcepub fn nameservers<I>(self, nameservers: I) -> Self
pub fn nameservers<I>(self, nameservers: I) -> Self
Set the upstream nameservers to forward queries to. When one or
more are set, the interceptor uses these instead of the
nameservers in the host’s /etc/resolv.conf. Replaces any
previously-set nameservers. Each element is any type convertible
into Nameserver (SocketAddr, IpAddr, or a parsed
string via "dns.google:53".parse::<Nameserver>()?).
Sourcepub fn query_timeout_ms(self, ms: u64) -> Self
pub fn query_timeout_ms(self, ms: u64) -> Self
Set the per-DNS-query timeout in milliseconds. Default: 5000.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DnsBuilder
impl RefUnwindSafe for DnsBuilder
impl Send for DnsBuilder
impl Sync for DnsBuilder
impl Unpin for DnsBuilder
impl UnsafeUnpin for DnsBuilder
impl UnwindSafe for DnsBuilder
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§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
Mutably borrows from an owned value. Read more