#![doc(
html_favicon_url = "https://raw.githubusercontent.com/plabayo/rama/main/docs/img/old_logo.png"
)]
#![doc(html_logo_url = "https://raw.githubusercontent.com/plabayo/rama/main/docs/img/old_logo.png")]
#![cfg_attr(docsrs, feature(doc_auto_cfg, doc_cfg))]
#![cfg_attr(test, allow(clippy::float_cmp))]
#![cfg_attr(not(test), warn(clippy::print_stdout, clippy::dbg_macro))]
pub(crate) mod body;
pub use body::{Body, BodyDataStream};
mod body_limit;
pub use body_limit::BodyLimit;
mod body_ext;
pub use body_ext::BodyExtractExt;
pub type Request<T = Body> = http::Request<T>;
pub type Response<T = Body> = http::Response<T>;
pub mod proto;
pub mod conn;
pub mod dep {
pub mod http {
#[doc(inline)]
pub use http::*;
}
pub mod http_body {
#[doc(inline)]
pub use http_body::*;
}
pub mod http_body_util {
#[doc(inline)]
pub use http_body_util::*;
}
pub mod mime {
#[doc(inline)]
pub use mime::*;
}
pub mod mime_guess {
#[doc(inline)]
pub use mime_guess::*;
}
}
pub mod header {
#[doc(inline)]
pub use crate::dep::http::header::*;
macro_rules! static_header {
($($name_bytes:literal),+ $(,)?) => {
$(
rama_macros::paste! {
#[doc = concat!("header name constant for `", $name_bytes, "`.")]
pub static [<$name_bytes:snake:upper>]: super::HeaderName = super::HeaderName::from_static($name_bytes);
}
)+
};
}
static_header!["x-forwarded-host", "x-forwarded-for", "x-forwarded-proto",];
static_header!["keep-alive", "proxy-connection"];
static_header![
"cf-connecting-ip",
"true-client-ip",
"client-ip",
"x-client-ip",
"x-real-ip",
];
pub static RAMA_ID_HEADER_VALUE: HeaderValue = HeaderValue::from_static(
const_format::formatcp!("{}/{}", rama_utils::info::NAME, rama_utils::info::VERSION),
);
}
#[doc(inline)]
pub use self::dep::http::header::{HeaderMap, HeaderName, HeaderValue};
#[doc(inline)]
pub use self::dep::http::method::Method;
#[doc(inline)]
pub use self::dep::http::status::StatusCode;
#[doc(inline)]
pub use self::dep::http::uri::{Scheme, Uri};
#[doc(inline)]
pub use self::dep::http::version::Version;