A lightweight, high-performance, and cross-platform Rust HTTP server library built on Tokio. It simplifies modern web service development by providing built-in support for middleware, WebSocket, Server-Sent Events (SSE), and raw TCP communication. With a unified and ergonomic API across Windows, Linux, and MacOS, it enables developers to build robust, scalable, and event-driven network applications with minimal overhead and maximum flexibility.
usecrate::*;/// Implementation of `From` trait for converting external errors into `ServerError`.
////// This allows using the `?` operator to automatically convert `std::io::Error`
/// into `ServerError::TcpBind` when binding to a TCP socket.
implFrom<std::io::Error>forServerError{/// Creates a new `ServerError::TcpBind` instance from a `std::io::Error`.
////// # Arguments
////// - `std::io::Error` - The `std::io::Error` to convert.
////// # Returns
////// - `Self` - A new `ServerError::TcpBind` instance.
#[inline(always)]fnfrom(error:std::io::Error)->Self{ServerError::TcpBind(error.to_string())}}