diff --git a/src/async_impl/client.rs b/src/async_impl/client.rs index e778021c8..21df312b2 100644 --- a/src/async_impl/client.rs +++ b/src/async_impl/client.rs @@ -1104,6 +1104,7 @@ impl ClientBuilder { /// Only use HTTP/3. #[cfg(feature = "http3")] + #[cfg_attr(docsrs, doc(cfg(all(reqwest_unstable, feature = "http3",))))] pub fn http3_prior_knowledge(mut self) -> ClientBuilder { self.config.http_version_pref = HttpVersionPref::Http3; self @@ -1512,6 +1513,14 @@ impl ClientBuilder { self } + /// Restrict the Client to be used with HTTPS only requests. + /// + /// Defaults to false. + pub fn https_only(mut self, enabled: bool) -> ClientBuilder { + self.config.https_only = enabled; + self + } + /// Enables the [trust-dns](trust_dns_resolver) async resolver instead of a default threadpool using `getaddrinfo`. /// /// If the `trust-dns` feature is turned on, the default option is enabled. @@ -1543,14 +1552,6 @@ impl ClientBuilder { } } - /// Restrict the Client to be used with HTTPS only requests. - /// - /// Defaults to false. - pub fn https_only(mut self, enabled: bool) -> ClientBuilder { - self.config.https_only = enabled; - self - } - /// Override DNS resolution for specific domains to a particular IP address. /// /// Warning @@ -1593,6 +1594,7 @@ impl ClientBuilder { /// /// The default is false. #[cfg(feature = "http3")] + #[cfg_attr(docsrs, doc(cfg(all(reqwest_unstable, feature = "http3",))))] pub fn set_tls_enable_early_data(mut self, enabled: bool) -> ClientBuilder { self.config.tls_enable_early_data = enabled; self @@ -1604,6 +1606,7 @@ impl ClientBuilder { /// /// [`TransportConfig`]: https://docs.rs/quinn/latest/quinn/struct.TransportConfig.html #[cfg(feature = "http3")] + #[cfg_attr(docsrs, doc(cfg(all(reqwest_unstable, feature = "http3",))))] pub fn set_quic_max_idle_timeout(mut self, value: Duration) -> ClientBuilder { self.config.quic_max_idle_timeout = Some(value); self @@ -1616,6 +1619,7 @@ impl ClientBuilder { /// /// [`TransportConfig`]: https://docs.rs/quinn/latest/quinn/struct.TransportConfig.html #[cfg(feature = "http3")] + #[cfg_attr(docsrs, doc(cfg(all(reqwest_unstable, feature = "http3",))))] pub fn set_quic_stream_receive_window(mut self, value: VarInt) -> ClientBuilder { self.config.quic_stream_receive_window = Some(value); self @@ -1628,6 +1632,7 @@ impl ClientBuilder { /// /// [`TransportConfig`]: https://docs.rs/quinn/latest/quinn/struct.TransportConfig.html #[cfg(feature = "http3")] + #[cfg_attr(docsrs, doc(cfg(all(reqwest_unstable, feature = "http3",))))] pub fn set_quic_receive_window(mut self, value: VarInt) -> ClientBuilder { self.config.quic_receive_window = Some(value); self @@ -1639,6 +1644,7 @@ impl ClientBuilder { /// /// [`TransportConfig`]: https://docs.rs/quinn/latest/quinn/struct.TransportConfig.html #[cfg(feature = "http3")] + #[cfg_attr(docsrs, doc(cfg(all(reqwest_unstable, feature = "http3",))))] pub fn set_quic_send_window(mut self, value: u64) -> ClientBuilder { self.config.quic_send_window = Some(value); self