1
1
#![ cfg_attr( docsrs, feature( doc_cfg) ) ]
2
2
//! # hyper_trust_dns_connector
3
3
//!
4
- //! A crate to make [trust-dns- resolver](https://docs.rs/trust-dns- resolver)'s
4
+ //! A crate to make [hickory- resolver](https://docs.rs/hickory- resolver/ )'s (previously trust_dns_resolver)
5
5
//! asynchronous resolver compatible with [hyper](https://docs.rs/hyper) client,
6
6
//! to use instead of the default dns threadpool.
7
7
//!
14
14
//!
15
15
//! ## Usage
16
16
//!
17
- //! [trust-dns- resolver](https://docs.rs/trust-dns- resolver) creates an async resolver
17
+ //! [hickory- resolver](https://docs.rs/hickory- resolver/ ) creates an async resolver
18
18
//! for dns queries, which is then used by hyper
19
19
//!
20
20
//! ## Example
@@ -44,8 +44,8 @@ use std::pin::Pin;
44
44
use std:: task:: { Context , Poll } ;
45
45
use std:: { future:: Future , net:: SocketAddr , net:: ToSocketAddrs } ;
46
46
47
- /// Wrapper around trust-dns -resolver's
48
- /// [`TokioAsyncResolver`](https://docs.rs/trust-dns- resolver/0.20.0/trust_dns_resolver /type.TokioAsyncResolver.html)
47
+ /// Wrapper around hickory -resolver's
48
+ /// [`TokioAsyncResolver`](https://docs.rs/hickory- resolver/0.24.2/hickory_resolver /type.TokioAsyncResolver.html)
49
49
///
50
50
/// The resolver runs a background Task which manages dns requests. When a new resolver is created,
51
51
/// the background task is also created, it needs to be spawned on top of an executor before using the client,
@@ -55,14 +55,14 @@ pub struct AsyncHyperResolver(TokioAsyncResolver);
55
55
56
56
impl AsyncHyperResolver {
57
57
/// constructs a new resolver, arguments are passed to the corresponding method of
58
- /// [`TokioAsyncResolver`](https://docs.rs/trust-dns- resolver/0.20.0/trust_dns_resolver/type.TokioAsyncResolver .html#method.new)
58
+ /// [`TokioAsyncResolver`](https://docs.rs/hickory- resolver/0.24.2/hickory_resolver/struct.AsyncResolver .html#method.new)
59
59
pub fn new ( config : ResolverConfig , options : ResolverOpts ) -> Result < Self , io:: Error > {
60
60
let resolver = TokioAsyncResolver :: tokio ( config, options) ;
61
61
Ok ( Self ( resolver) )
62
62
}
63
63
64
64
/// constructs a new resolver from default configuration, uses the corresponding method of
65
- /// [`TokioAsyncResolver`](https://docs.rs/trust-dns- resolver/0.20.0/trust_dns_resolver/type.TokioAsyncResolver .html#method.new )
65
+ /// [`TokioAsyncResolver`](https://docs.rs/hickory- resolver/0.24.2/hickory_resolver/struct.AsyncResolver .html#method.tokio_from_system_conf )
66
66
pub fn new_from_system_conf ( ) -> Result < Self , io:: Error > {
67
67
let resolver = TokioAsyncResolver :: tokio_from_system_conf ( ) ?;
68
68
Ok ( Self ( resolver) )
0 commit comments