hyper_middleware/
lib.rs

1#![deny(missing_docs)]
2#![forbid(unsafe_code)]
3#![deny(warnings)]
4#![deny(rust_2018_idioms)]
5#![deny(dead_code)]
6#![cfg_attr(docsrs, feature(doc_cfg))]
7
8//! # hyper_middleware
9//!
10//! `hyper_middleware` is a complement set of HTTP middlewares with a small Hyper Service to get started with a HTTP server easily.
11//! This module only supports Hyper `0.14`.
12//!
13//! ## Features
14//!
15//! - Compact [Middleware & Handler System][`middleware`] inspired by [The Iron Framework](https://github.com/iron/iron).
16//! - Simple [Hyper Service][`hyper::service::Service`] with [Remote Address][`hyper::server::conn::AddrStream`] access.
17//! - Convenient [`Error`] and [`Result`] types powered by [anyhow](https://github.com/dtolnay/anyhow).
18//! - `Async` support via [async-trait](https://github.com/dtolnay/async-trait).
19//! - Macros to facilitate HTTP response errors or error casting.
20//!
21//! Check it out [`middleware`] module for more details.
22//!
23
24pub mod error;
25pub mod http;
26pub mod middleware;
27pub mod remote_addr;
28pub mod service;
29
30pub use error::{Context, Error, Result};
31pub use http::*;
32pub use middleware::*;
33pub use remote_addr::*;
34pub use service::*;
35
36// Re-export crates
37pub use async_recursion::*;
38pub use async_trait::*;