http_handle/
lib.rs

1// src/lib.rs
2
3#![doc = include_str!("../README.md")]
4#![doc(
5    html_favicon_url = "https://kura.pro/http-handle/images/favicon.ico",
6    html_logo_url = "https://kura.pro/http-handle/images/logos/http-handle.svg",
7    html_root_url = "https://docs.rs/http-handle"
8)]
9#![crate_name = "http_handle"]
10#![crate_type = "lib"]
11
12//! # HTTP Handle
13//!
14//! The `http-handle` is a robust Rust library designed for serving static websites. It provides a simple yet efficient HTTP server implementation with features like request parsing, response generation, and basic security measures. The library is not intended to be a full-fledged web server but rather a lightweight solution for serving static files over HTTP for development and testing purposes.
15//!
16//! ## Modules
17//! - [`server`]: Contains the core `Server` struct and logic for managing HTTP connections.
18//! - [`request`]: Handles incoming HTTP requests, parsing and validation.
19//! - [`response`]: Provides utilities for crafting HTTP responses.
20//! - [`error`]: Defines errors related to the server's operation.
21//!
22
23/// The `server` module contains the core `Server` struct and associated methods for starting
24/// and managing the HTTP server.
25pub mod server;
26
27/// The `request` module is responsible for parsing and validating incoming HTTP requests.
28pub mod request;
29
30/// The `response` module provides tools and utilities for crafting HTTP responses.
31pub mod response;
32
33/// The `error` module defines various errors that can occur during server operation, including
34/// those related to connections and malformed requests.
35pub mod error;
36
37pub use error::ServerError;
38pub use server::Server;