cdns_rs/a_sync/mod.rs
1/*-
2 * cdns-rs - a simple sync/async DNS query library
3 *
4 * Copyright (C) 2020 Aleksandr Morozov
5 *
6 * Copyright (C) 2025 Aleksandr Morozov
7 *
8 * The syslog-rs crate can be redistributed and/or modified
9 * under the terms of either of the following licenses:
10 *
11 * 1. the Mozilla Public License Version 2.0 (the “MPL”) OR
12 *
13 * 2. EUROPEAN UNION PUBLIC LICENCE v. 1.2 EUPL © the European Union 2007, 2016
14 */
15
16/// A caches of the resolv.conf and other files.
17pub mod caches;
18
19/// Configuration parsers.
20mod cfg_parsers;
21
22/// `hosts` file parser.
23mod cfg_host_parser;
24
25/// `resolv.conf` file parser.
26mod cfg_resolv_parser;
27
28/// Tokio crate only. Requires feature `use_async_tokio` to be enabled.
29/// Provides tokio based async.
30#[cfg(feature = "use_async_tokio")]
31pub mod tokio_exc;
32
33/// An async File IO and Mutex interface for different `async` execs.
34pub mod interface;
35
36/// A main mod which contains the [QDns] for queries.
37pub mod query;
38
39/// A networking code.
40pub mod network;
41
42/// A pre-prepared requests.
43pub mod request;
44
45pub use crate::cfg_resolv_parser::ResolveConfig;
46pub use crate::query::QuerySetup;
47pub use crate::common::{QType, DnsRdata, QDnsName};
48
49pub use network::{SocketTaps, NetworkTap, SocketTap};
50pub use query::QDns;
51pub use caches::{CachesController, CacheInstance};
52
53#[cfg(feature = "use_async_tokio")]
54pub use tokio_exc::async_intrf::TokioInterf;
55
56#[cfg(feature = "use_async_tokio")]
57pub use tokio_exc::TokioSocketBase;
58
59#[cfg(feature = "use_async_tokio")]
60pub type SocketBase = TokioSocketBase;
61
62#[cfg(feature = "use_async_tokio")]
63pub type IoInterf = TokioInterf;