cdns-rs 1.2.2

A native Sync/Async Rust implementation of client DNS resolver.
Documentation
/*-
 * cdns-rs - a simple sync/async DNS query library
 * 
 * Copyright (C) 2020  Aleksandr Morozov
 * 
 * Copyright (C) 2025 Aleksandr Morozov
 * 
 * The syslog-rs crate can be redistributed and/or modified
 * under the terms of either of the following licenses:
 *
 *   1. the Mozilla Public License Version 2.0 (the “MPL”) OR
 *                     
 *   2. EUROPEAN UNION PUBLIC LICENCE v. 1.2 EUPL © the European Union 2007, 2016
 */

/// A caches of the resolv.conf and other files.
pub mod caches;

/// Configuration parsers.
mod cfg_parsers;

/// `hosts` file parser.
mod cfg_host_parser;

/// `resolv.conf` file parser.
mod cfg_resolv_parser;

/// Tokio crate only. Requires feature `use_async_tokio` to be enabled. 
/// Provides tokio based async.
#[cfg(feature = "use_async_tokio")]
pub mod tokio_exc;

/// An async File IO and Mutex interface for different `async` execs.
pub mod interface;

/// A main mod which contains the [QDns] for queries.
pub mod query;

/// A networking code. 
pub mod network;

/// A pre-prepared requests.
pub mod request;

pub use crate::cfg_resolv_parser::ResolveConfig;
pub use crate::query::QuerySetup;
pub use crate::common::{QType, DnsRdata, QDnsName};

pub use network::{SocketTaps, NetworkTap, SocketTap};
pub use query::QDns;
pub use caches::{CachesController, CacheInstance};

#[cfg(feature = "use_async_tokio")]
pub use tokio_exc::async_intrf::TokioInterf;

#[cfg(feature = "use_async_tokio")]
pub use tokio_exc::TokioSocketBase;

#[cfg(feature = "use_async_tokio")]
pub type SocketBase = TokioSocketBase;

#[cfg(feature = "use_async_tokio")]
pub type IoInterf = TokioInterf;