pub struct DnsResolver { /* private fields */ }Implementations§
Source§impl DnsResolver
impl DnsResolver
pub fn new() -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
pub async fn resolve( &self, domain: &str, record_type: RecordType, nameserver: Option<&str>, ) -> Result<Vec<DnsRecord>>
pub async fn resolve_srv( &self, service: &str, protocol: &str, domain: &str, nameserver: Option<&str>, ) -> Result<Vec<DnsRecord>>
Trait Implementations§
Source§impl Clone for DnsResolver
impl Clone for DnsResolver
Source§fn clone(&self) -> DnsResolver
fn clone(&self) -> DnsResolver
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 DnsResolver
impl Debug for DnsResolver
Auto Trait Implementations§
impl Freeze for DnsResolver
impl RefUnwindSafe for DnsResolver
impl Send for DnsResolver
impl Sync for DnsResolver
impl Unpin for DnsResolver
impl UnwindSafe for DnsResolver
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