pub trait Resolver: Debug + Sync + Send {
    fn resolve(&self, domain: &str, opts: ResolveOptions<'_>) -> ResolveResult;

    fn async_resolve<'a>(
        &'a self,
        domain: &'a str,
        opts: ResolveOptions<'a>
    ) -> BoxFuture<'a, ResolveResult> { ... } }
Expand description

域名解析的接口

同时提供阻塞接口和异步接口,异步接口则需要启用 async 功能

Required Methods

解析域名

该方法的异步版本为 Self::async_resolve

Provided Methods

Available on crate feature async only.

异步解析域名

Implementations on Foreign Types

Available on crate feature async only.
Available on crate feature async only.
Available on crate feature async only.
Available on crate feature async only.
Available on crate feature async only.

Implementors