File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -29,13 +29,13 @@ http-body-util = { version = "=0.1.0-rc.3", optional = true }
2929httparse = " 1.8"
3030h2 = { version = " 0.3.9" , optional = true }
3131pin-project-lite = " 0.2.4"
32- tokio = { version = " 1" , features = [" sync" ] }
3332
3433# Optional
3534
3635httpdate = { version = " 1.0" , optional = true }
3736itoa = { version = " 1" , optional = true }
3837libc = { version = " 0.2" , optional = true }
38+ tokio = { version = " 1" , features = [" sync" ], optional = true }
3939tracing = { version = " 0.1" , default-features = false , features = [" std" ], optional = true }
4040want = { version = " 0.3" , optional = true }
4141
@@ -74,13 +74,16 @@ full = [
7474]
7575
7676# HTTP versions
77- http1 = [" dep:itoa" ]
78- http2 = [" dep:h2" ]
77+ http1 = [" upgrade " , " dep:itoa" ]
78+ http2 = [" upgrade " , " dep:h2" ]
7979
8080# Client/Server
8181client = [" dep:want" ]
8282server = [" dep:httpdate" ]
8383
84+ # HTTP Upgrades
85+ upgrade = [" dep:tokio" ]
86+
8487# C-API support (currently unstable (no semver))
8588ffi = [" dep:libc" , " dep:http-body-util" ]
8689
Original file line number Diff line number Diff line change 4949//! - `http2`: Enables HTTP/2 support.
5050//! - `client`: Enables the HTTP `client`.
5151//! - `server`: Enables the HTTP `server`.
52+ //! - `upgrade`: Enables [HTTP Upgrades].
5253//!
5354//! [feature flags]: https://doc.rust-lang.org/cargo/reference/manifest.html#the-features-section
55+ //! [Http Upgrades]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Protocol_upgrade_mechanism
5456//!
5557//! # Unstable Features
5658//! hyper includes a set of unstable optional features that can be enabled through the use of a
@@ -93,7 +95,6 @@ pub mod ext;
9395mod mock;
9496pub mod rt;
9597pub mod service;
96- pub mod upgrade;
9798
9899#[ cfg( feature = "ffi" ) ]
99100#[ cfg_attr( docsrs, doc( cfg( all( feature = "ffi" , hyper_unstable_ffi) ) ) ) ]
@@ -115,3 +116,9 @@ cfg_feature! {
115116
116117 pub mod server;
117118}
119+
120+ cfg_feature ! {
121+ #![ feature = "upgrade" ]
122+
123+ pub mod upgrade;
124+ }
You can’t perform that action at this time.
0 commit comments