pub struct ResolverBuilder<P> { /* private fields */ }
Expand description
A builder to construct a Resolver
.
Created by Resolver::builder
.
Implementations§
Source§impl<P> ResolverBuilder<P>where
P: ConnectionProvider,
impl<P> ResolverBuilder<P>where
P: ConnectionProvider,
Sourcepub fn with_options(self, options: ResolverOpts) -> Self
pub fn with_options(self, options: ResolverOpts) -> Self
Sets the ResolverOpts
to be used by the resolver.
NB: A ResolverBuilder<P>
will use the system configuration e.g., resolv.conf
, by
default. Usage of this method will overwrite any options set by the system configuration.
See system_conf
for functions that can parse a ResolverOpts
from the system configuration, or use options_mut()
to
acquire a muitable reference to the existing ResolverOpts
.
Sourcepub fn options_mut(&mut self) -> &mut ResolverOpts
pub fn options_mut(&mut self) -> &mut ResolverOpts
Returns a mutable reference to the ResolverOpts
.
Sourcepub fn with_trust_anchor(self, trust_anchor: Arc<TrustAnchors>) -> Self
Available on crate feature __dnssec
only.
pub fn with_trust_anchor(self, trust_anchor: Arc<TrustAnchors>) -> Self
__dnssec
only.Set the DNSSEC trust anchors to be used by the resolver.
Auto Trait Implementations§
impl<P> Freeze for ResolverBuilder<P>where
P: Freeze,
impl<P> !RefUnwindSafe for ResolverBuilder<P>
impl<P> Send for ResolverBuilder<P>where
P: Send,
impl<P> Sync for ResolverBuilder<P>where
P: Sync,
impl<P> Unpin for ResolverBuilder<P>where
P: Unpin,
impl<P> !UnwindSafe for ResolverBuilder<P>
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