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 2025 Aleksandr Morozov
7 * 
8 * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by
9 * the European Commission - subsequent versions of the EUPL (the "Licence").
10 * 
11 * You may not use this work except in compliance with the Licence.
12 * 
13 * You may obtain a copy of the Licence at:
14 * 
15 *    https://joinup.ec.europa.eu/software/page/eupl
16 * 
17 * Unless required by applicable law or agreed to in writing, software
18 * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT
19 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
20 * Licence for the specific language governing permissions and limitations
21 * under the Licence.
22 */
23
24/// A caches of the resolv.conf and other files.
25pub mod caches;
26
27/// Configuration parsers.
28mod cfg_parsers;
29
30/// `hosts` file parser.
31mod cfg_host_parser;
32
33/// `resolv.conf` file parser.
34mod cfg_resolv_parser;
35
36/// Tokio crate only. Requires feature `use_async_tokio` to be enabled. 
37/// Provides tokio based async.
38#[cfg(feature = "use_async_tokio")]
39pub mod tokio_exc;
40
41/// An async File IO and Mutex interface for different `async` execs.
42pub mod interface;
43
44/// A main mod which contains the [QDns] for queries.
45pub mod query;
46
47/// A networking code. 
48pub mod network;
49
50/// A pre-prepared requests.
51pub mod request;
52
53pub use crate::cfg_resolv_parser::ResolveConfig;
54pub use crate::query::QuerySetup;
55pub use crate::common::{QType, DnsRdata, QDnsName};
56
57pub use network::{SocketTaps, NetworkTap, SocketTap};
58pub use query::QDns;
59pub use caches::{CachesController, CacheInstance};
60
61#[cfg(feature = "use_async_tokio")]
62pub use tokio_exc::async_intrf::TokioInterf;
63
64#[cfg(feature = "use_async_tokio")]
65pub use tokio_exc::TokioSocketBase;
66
67#[cfg(feature = "use_async_tokio")]
68pub type SocketBase = TokioSocketBase;
69
70#[cfg(feature = "use_async_tokio")]
71pub type IoInterf = TokioInterf;