@@ -20,6 +20,7 @@ use crate::common::exec::{ConnStreamExec, NewSvcExec};
2020use crate :: common:: { task, Future , Pin , Poll , Unpin } ;
2121// Renamed `Http` as `Http_` for now so that people upgrading don't see an
2222// error that `hyper::server::Http` is private...
23+ #[ cfg_attr( feature = "deprecated" , allow( deprecated) ) ]
2324use super :: conn:: { Connection , Http as Http_ , UpgradeableConnection } ;
2425use super :: shutdown:: { Graceful , GracefulWatcher } ;
2526use crate :: service:: { HttpService , MakeServiceRef } ;
@@ -33,6 +34,7 @@ pin_project! {
3334 /// handlers. It is built using the [`Builder`](Builder), and the future
3435 /// completes when the server has been shutdown. It should be run by an
3536 /// `Executor`.
37+ #[ cfg_attr( feature = "deprecated" , allow( deprecated) ) ]
3638 pub struct Server <I , S , E = Exec > {
3739 #[ pin]
3840 incoming: I ,
@@ -44,6 +46,7 @@ pin_project! {
4446/// A builder for a [`Server`](Server).
4547#[ derive( Debug ) ]
4648#[ cfg_attr( docsrs, doc( cfg( any( feature = "http1" , feature = "http2" ) ) ) ) ]
49+ #[ cfg_attr( feature = "deprecated" , allow( deprecated) ) ]
4750pub struct Builder < I , E = Exec > {
4851 incoming : I ,
4952 protocol : Http_ < E > ,
@@ -52,6 +55,7 @@ pub struct Builder<I, E = Exec> {
5255// ===== impl Server =====
5356
5457#[ cfg_attr( docsrs, doc( cfg( any( feature = "http1" , feature = "http2" ) ) ) ) ]
58+ #[ cfg_attr( feature = "deprecated" , allow( deprecated) ) ]
5559impl < I > Server < I , ( ) > {
5660 /// Starts a [`Builder`](Builder) with the provided incoming stream.
5761 pub fn builder ( incoming : I ) -> Builder < I > {
@@ -105,6 +109,7 @@ impl<S, E> Server<AddrIncoming, S, E> {
105109}
106110
107111#[ cfg_attr( docsrs, doc( cfg( any( feature = "http1" , feature = "http2" ) ) ) ) ]
112+ #[ cfg_attr( feature = "deprecated" , allow( deprecated) ) ]
108113impl < I , IO , IE , S , E , B > Server < I , S , E >
109114where
110115 I : Accept < Conn = IO , Error = IE > ,
@@ -207,6 +212,7 @@ where
207212}
208213
209214#[ cfg_attr( docsrs, doc( cfg( any( feature = "http1" , feature = "http2" ) ) ) ) ]
215+ #[ cfg_attr( feature = "deprecated" , allow( deprecated) ) ]
210216impl < I , IO , IE , S , B , E > Future for Server < I , S , E >
211217where
212218 I : Accept < Conn = IO , Error = IE > ,
@@ -237,6 +243,7 @@ impl<I: fmt::Debug, S: fmt::Debug> fmt::Debug for Server<I, S> {
237243// ===== impl Builder =====
238244
239245#[ cfg_attr( docsrs, doc( cfg( any( feature = "http1" , feature = "http2" ) ) ) ) ]
246+ #[ cfg_attr( feature = "deprecated" , allow( deprecated) ) ]
240247impl < I , E > Builder < I , E > {
241248 /// Start a new builder, wrapping an incoming stream and low-level options.
242249 ///
@@ -771,6 +778,7 @@ pin_project! {
771778 #[ must_use = "futures do nothing unless polled" ]
772779 #[ derive( Debug ) ]
773780 #[ cfg_attr( docsrs, doc( cfg( any( feature = "http1" , feature = "http2" ) ) ) ) ]
781+ #[ cfg_attr( feature = "deprecated" , allow( deprecated) ) ]
774782 pub struct Connecting <I , F , E = Exec > {
775783 #[ pin]
776784 future: F ,
0 commit comments