[−][src]Struct domain_resolv::stub::StubResolver
A DNS stub resolver.
This type collects all information making it possible to start DNS
queries. You can create a new resoler using the system’s configuration
using the new()
associate function or using your own configuration
with from_conf()
.
Stub resolver values can be cloned relatively cheaply as they keep all information behind an arc.
If you want to run a single query or lookup on a resolver synchronously,
you can do so simply by using the run()
or run_with_conf()
associated functions.
Implementations
impl StubResolver
[src]
pub fn new() -> Self
[src]
Creates a new resolver using the system’s default configuration.
pub fn from_conf(conf: ResolvConf) -> Self
[src]
Creates a new resolver using the given configuraiton.
pub fn options(&self) -> &ResolvOptions
[src]
pub async fn query<N: ToDname, Q: Into<Question<N>>, '_>(
&'_ self,
question: Q
) -> Result<Answer, Error>
[src]
&'_ self,
question: Q
) -> Result<Answer, Error>
impl StubResolver
[src]
pub async fn lookup_addr<'_, '_>(
&'_ self,
addr: IpAddr
) -> Result<FoundAddrs<&'_ Self>, Error>
[src]
&'_ self,
addr: IpAddr
) -> Result<FoundAddrs<&'_ Self>, Error>
pub async fn lookup_host<'_, '_>(
&'_ self,
qname: impl ToDname
) -> Result<FoundHosts<&'_ Self>, Error>
[src]
&'_ self,
qname: impl ToDname
) -> Result<FoundHosts<&'_ Self>, Error>
pub async fn search_host<'_, '_>(
&'_ self,
qname: impl ToRelativeDname
) -> Result<FoundHosts<&'_ Self>, Error>
[src]
&'_ self,
qname: impl ToRelativeDname
) -> Result<FoundHosts<&'_ Self>, Error>
pub async fn lookup_srv<'_>(
&'_ self,
service: impl ToRelativeDname,
name: impl ToDname,
fallback_port: u16
) -> Result<Option<FoundSrvs>, SrvError>
[src]
&'_ self,
service: impl ToRelativeDname,
name: impl ToDname,
fallback_port: u16
) -> Result<Option<FoundSrvs>, SrvError>
Trait Implementations
impl Clone for StubResolver
[src]
fn clone(&self) -> StubResolver
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for StubResolver
[src]
impl Default for StubResolver
[src]
impl<'a> Resolver for &'a StubResolver
[src]
type Octets = Bytes
type Answer = Answer
The answer returned by a query. Read more
type Query = Pin<Box<dyn Future<Output = Result<Answer, Error>> + 'a>>
The future resolving into an answer.
fn query<N, Q>(&self, question: Q) -> Self::Query where
N: ToDname,
Q: Into<Question<N>>,
[src]
N: ToDname,
Q: Into<Question<N>>,
impl<'a> SearchNames for &'a StubResolver
[src]
Auto Trait Implementations
impl RefUnwindSafe for StubResolver
impl Send for StubResolver
impl Sync for StubResolver
impl Unpin for StubResolver
impl UnwindSafe for StubResolver
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,