diff --git a/bindings/rust/s2n-tls-hyper/src/connector.rs b/bindings/rust/s2n-tls-hyper/src/connector.rs index 76bc864dfc1..7f3a828f604 100644 --- a/bindings/rust/s2n-tls-hyper/src/connector.rs +++ b/bindings/rust/s2n-tls-hyper/src/connector.rs @@ -54,6 +54,9 @@ where /// `conn_builder` will be used to produce the s2n-tls Connections used for negotiating HTTPS, /// which can be an `s2n_tls::config::Config` or other `s2n_tls::connection::Builder`. /// + /// This API creates a `Builder` with the default hyper `HttpConnector`. To use an existing HTTP + /// connector, use `HttpsConnector::builder_with_http()`. + /// /// Note that s2n-tls-hyper will override the ALPN extension to negotiate HTTP. Any ALPN values /// configured on `conn_builder` with APIs like /// `s2n_tls::config::Builder::set_application_protocol_preference()` will be ignored. @@ -68,7 +71,7 @@ where } } -impl HttpsConnector +impl HttpsConnector where ConnBuilder: connection::Builder, ::Output: Unpin, @@ -98,10 +101,7 @@ where /// Note that s2n-tls-hyper will override the ALPN extension to negotiate HTTP. Any ALPN values /// configured on `conn_builder` with APIs like /// `s2n_tls::config::Builder::set_application_protocol_preference()` will be ignored. - pub fn builder_with_http( - http: HttpConnector, - conn_builder: ConnBuilder, - ) -> Builder { + pub fn builder_with_http(http: Http, conn_builder: ConnBuilder) -> Builder { Builder { http, conn_builder,