Skip to content

Commit 4030f86

Browse files
Fishrock123cpu
authored andcommitted
feat: add a builder() method to HttpsConnector
It's become very idiomatic to have the builder api be accessed this way.
1 parent 68c7d05 commit 4030f86

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/connector.rs

+7
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ pub struct HttpsConnector<T> {
2828
}
2929

3030
impl<T> HttpsConnector<T> {
31+
/// Creates a [`crate::HttpsConnectorBuilder`] to configure a `HttpsConnector`.
32+
///
33+
/// This is the same as [`crate::HttpsConnectorBuilder::new()`].
34+
pub fn builder() -> builder::ConnectorBuilder<builder::WantsTlsConfig> {
35+
builder::ConnectorBuilder::new()
36+
}
37+
3138
/// Force the use of HTTPS when connecting.
3239
///
3340
/// If a URL is not `https` when connecting, an error is returned.

0 commit comments

Comments
 (0)