From e41bac7f391f9aee68bf17a962aee3713ffd2eba Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Fri, 27 Aug 2021 10:58:50 +0200 Subject: [PATCH] Expose hyper's http2 feature flag (#279) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Order features alphabetically … in Cargo.toml and crate docs. * Improve ws feature docs * Expose hyper's http2 feature flag --- Cargo.toml | 3 ++- src/lib.rs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index dfb083a9..623dcd7a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,9 +16,10 @@ members = ["examples/*"] [features] default = ["tower-log"] -ws = ["tokio-tungstenite", "sha-1", "base64"] +http2 = ["hyper/http2"] multipart = ["multer", "mime"] tower-log = ["tower/log"] +ws = ["tokio-tungstenite", "sha-1", "base64"] [dependencies] async-trait = "0.1" diff --git a/src/lib.rs b/src/lib.rs index 082796f5..9c41c8eb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -938,10 +938,11 @@ //! //! The following optional features are available: //! -//! - `ws`: Enables WebSockets support. //! - `headers`: Enables extracting typed headers via [`extract::TypedHeader`]. +//! - `http2`: Enables hyper's `http2` feature. //! - `multipart`: Enables parsing `multipart/form-data` requests with [`extract::Multipart`]. //! - `tower-log`: Enables `tower`'s `log` feature. Enabled by default. +//! - `ws`: Enables WebSockets support via [`extract::ws`]. //! //! [`tower`]: https://crates.io/crates/tower //! [`tower-http`]: https://crates.io/crates/tower-http