domain/resolv/mod.rs
1//! Asynchronous DNS resolving.
2//!
3//! In the DNS, a resolver processes and attempts to answer questions. This
4//! crate provides a number of such resolvers – or will be, once it is more
5//! complete. In addition, the crate provides higher level abstraction of
6//! the information that can be obtained via DNS queries. We call these
7//! _lookups_.
8//!
9//! The various types of resolvers available all implement the [`Resolver`]
10//! trait which provides the basic functionality of all resolvers:
11//! asynchronously answering questions.
12//!
13//! The following resolvers are available:
14//!
15//! * [`StubResolver`] is the most simple resolver of them all. It is being
16//! configured with a list of upstream resolvers and simply forwards all
17//! queries to those resolvers, expecting them to do all the heavy work.
18//!
19//! See the [stub] module for more information on how to use the stub
20//! resolver.
21//!
22//! The lookups implemented by the crate are generic over the particular
23//! resolver, so you can pick the resolver most suitable for your own
24//! application or even implement your own specialised resolver. All
25//! lookups are implemented as functions in the [lookup] module. For
26//! convenience, they are also available as methods on the [`Resolver`]
27//! trait.
28//!
29//! [lookup]: lookup/index.html
30//! [stub]: stub/index.html
31//! [`Resolver`]: resolver/trait.Resolver.html
32//! [`StubResolver`]: stub/struct.StubResolver.html
33#![cfg(feature = "resolv")]
34#![cfg_attr(docsrs, doc(cfg(feature = "resolv")))]
35
36pub use self::resolver::Resolver;
37pub use self::stub::StubResolver;
38
39pub mod lookup;
40pub mod resolver;
41pub mod stub;