toolkit-zero 5.11.0

A feature-selective Rust utility crate — a modular collection of opt-in utilities spanning encryption, HTTP networking, geolocation, and build-time fingerprinting. Enable only the features your project requires.

//! Convenience re-exports for the `socket` module.
//!
//! Importing this prelude brings the most commonly used server and client
//! types into scope through a single `use` path:
//!
//! ```rust,no_run
//! use toolkit_zero::socket::prelude::*;
//!
//! // Server types — fluent builder
//! let mut server = Server::default();
//! server.mechanism(ServerMechanism::get("/health").onconnect(|| async { reply!() }));
//!
//! // Server types — attribute macro shorthand
//! #[mechanism(server, GET, "/hello")]
//! async fn hello() { reply!() }
//!
//! // Client types
//! let client = Client::new(Target::Localhost(8080));
//! ```
//!
//! Re-exports are gated by feature flags:
//! - `socket-server` / `socket`: [`Server`], [`ServerMechanism`], [`Status`], [`mechanism`], [`reply!`], [`html_reply`], [`forbidden`]
//! - `socket-client` / `socket`: [`Client`], [`ClientBuilder`], [`ClientError`], [`Target`], [`request`]
//! - always available: [`SerializationKey`]

pub use crate::socket::SerializationKey;

#[cfg(any(feature = "socket", feature = "socket-server"))]
pub use crate::socket::server::{Server, ServerMechanism, Status, mechanism, reply, html_reply, forbidden};

#[cfg(any(feature = "socket", feature = "socket-client"))]
pub use crate::socket::client::{Client, ClientBuilder, ClientError, Target, request};