boluo_core/
lib.rs

1//! `boluo` 的核心类型和特征。
2
3#![forbid(unsafe_code)]
4#![warn(
5    missing_debug_implementations,
6    missing_docs,
7    rust_2018_idioms,
8    unreachable_pub
9)]
10#![cfg_attr(docsrs, feature(doc_auto_cfg, doc_cfg))]
11
12#[doc(hidden)]
13pub mod util;
14
15pub mod body;
16pub mod extract;
17pub mod handler;
18pub mod middleware;
19pub mod request;
20pub mod response;
21pub mod service;
22pub mod upgrade;
23
24pub mod http {
25    //! http 库的重新导出。
26
27    pub use http::header::{self, HeaderMap, HeaderName, HeaderValue};
28    pub use http::method::{self, Method};
29    pub use http::status::{self, StatusCode};
30    pub use http::uri::{self, Uri};
31    pub use http::version::{self, Version};
32    pub use http::{Error, Extensions, Result};
33}
34
35/// 类型擦除的错误类型别名
36pub type BoxError = Box<dyn std::error::Error + Send + Sync>;