veilid-tools 0.5.4

A collection of baseline tools for Rust development use by Veilid and Veilid-enabled Rust applications
Documentation
use super::*;

/////////////////////////////////////////////////////////////////////////////////
// Resolver
//
// Uses system resolver on windows and hickory-resolver elsewhere
// hickory-resolver hangs for a long time on Windows building some cache or something
// and we really should be using the built-in system resolver when possible

cfg_if! {

    /////////////////////////////////////////////////////////////////////////////
    // WASM (unsupported)

    if #[cfg(all(target_arch = "wasm32", target_os = "unknown"))] {
        mod wasm;
        pub use wasm::*;
    }

    /////////////////////////////////////////////////////////////////////////////
    // Non-Windows

    else if #[cfg(not(target_os = "windows"))] {
        mod non_windows;
        pub use non_windows::*;
    }

    /////////////////////////////////////////////////////////////////////////////
    // Windows

    else {
        mod windows;
        pub use windows::*;
    }

}

/// Error returned by DNS resolution operations.
#[derive(Debug, Clone, Eq, PartialEq, ThisError)]
pub enum ResolverError {
    /// Resolution failed; the string carries a backend-specific description.
    #[error("Generic resolver error")]
    Generic(String),
}