pub struct DnsProvider { /* private fields */ }Expand description
DNS provider configuration
Implementations§
Source§impl DnsProvider
impl DnsProvider
Sourcepub fn new(
name: impl Into<String>,
query_domain: impl Into<String>,
resolver_addr: SocketAddr,
record_type: DnsRecordType,
) -> Self
pub fn new( name: impl Into<String>, query_domain: impl Into<String>, resolver_addr: SocketAddr, record_type: DnsRecordType, ) -> Self
Create a new DNS provider
Sourcepub fn with_class(self, class: DnsClass) -> Self
pub fn with_class(self, class: DnsClass) -> Self
Set DNS class (for special queries like Cloudflare CHAOS)
Sourcepub fn with_v6_resolver(self, addr: SocketAddr) -> Self
pub fn with_v6_resolver(self, addr: SocketAddr) -> Self
Set IPv6 resolver address
When requesting IPv6, the query is sent to this resolver so the DNS server sees the client’s IPv6 source address.
Trait Implementations§
Source§impl Clone for DnsProvider
impl Clone for DnsProvider
Source§fn clone(&self) -> DnsProvider
fn clone(&self) -> DnsProvider
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DnsProvider
impl Debug for DnsProvider
Source§impl Provider for DnsProvider
impl Provider for DnsProvider
Source§fn supports_v4(&self) -> bool
fn supports_v4(&self) -> bool
Whether this provider supports IPv4
Source§fn supports_v6(&self) -> bool
fn supports_v6(&self) -> bool
Whether this provider supports IPv6
Source§fn get_ip<'life0, 'async_trait>(
&'life0 self,
version: IpVersion,
) -> Pin<Box<dyn Future<Output = Result<IpAddr, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_ip<'life0, 'async_trait>(
&'life0 self,
version: IpVersion,
) -> Pin<Box<dyn Future<Output = Result<IpAddr, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the public IP address
Source§fn supports_version(&self, version: IpVersion) -> bool
fn supports_version(&self, version: IpVersion) -> bool
Check if provider supports the given IP version
Auto Trait Implementations§
impl Freeze for DnsProvider
impl RefUnwindSafe for DnsProvider
impl Send for DnsProvider
impl Sync for DnsProvider
impl Unpin for DnsProvider
impl UnsafeUnpin for DnsProvider
impl UnwindSafe for DnsProvider
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