open-net 0.3.5

A cross-platform async networking library for Rust with HTTP and WebSocket clients, network status monitoring, configurable retries, WebSocket reconnection and heartbeats, and managed client lifecycles. Reuse common networking infrastructure across applications to avoid repeated implementation and debugging, helping save development time and AI coding tokens.
Documentation
//! Public types and entry points for `open-net`.
//!
//! This module groups configuration, error handling, logging, network-status
//! monitoring, and transport clients. Most items are re-exported at the crate
//! root so applications can use stable, concise import paths.

pub mod config;
pub mod error;
pub mod log;
#[cfg(feature = "net-status")]
pub mod net_status;
pub mod network;
#[cfg(feature = "quality-doctor")]
pub mod quality;
pub mod retry;
pub mod subscription;
#[cfg(any(feature = "ws-client", feature = "http-client"))]
pub mod tls;
#[cfg(feature = "ws-client")]
pub mod ws;

#[cfg(feature = "http-client")]
pub mod http;

#[cfg(feature = "ws-client")]
pub(crate) mod network_config;
pub(crate) mod open_net;
pub(crate) mod open_net_config;

pub use ::http::{HeaderMap, HeaderName, HeaderValue, StatusCode};
pub use bytes::Bytes;
/// String metadata associated with a request, event, or diagnostic record.
pub type Metadata = std::collections::BTreeMap<String, String>;

pub use config::OpenNetConfig;
pub use error::{BoxError, EnqueueError, NetError, Result};
pub use log::{
    LogDropStats, LogInfo, LogLevel, LogListener, LogSubscription, LogSubscriptionOptions, LogType,
    OpenNetLogger, SharedLogListener,
};
#[cfg(feature = "net-status")]
pub use net_status::{
    IpStack, MonitorState, NetStatusClient, NetworkEvent, NetworkEventKind, NetworkEventOptions,
    NetworkIpStackSource, NetworkNameObserver, NetworkNameOptions, NetworkNameSnapshot,
    NetworkNameSource, NetworkNameState, NetworkObservation, NetworkRefreshResult, NetworkSnapshot,
    NetworkStatus,
};
pub use open_net::OpenNet;
#[cfg(feature = "ws-client")]
pub use ws::WebSocketClient;