Skip to content

Commit be05a64

Browse files
committed
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 be05a64

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
@@ -34,6 +34,13 @@ impl<T> HttpsConnector<T> {
3434
pub fn enforce_https(&mut self) {
3535
self.force_https = true;
3636
}
37+
38+
/// Creates a [`HttpsConnectorBuilder`] to configure a `HttpsConnector`.
39+
///
40+
/// This is the same as [`HttpsConnector::new()`].
41+
pub fn builder() -> builder::ConnectorBuilder<builder::WantsTlsConfig> {
42+
builder::ConnectorBuilder::new()
43+
}
3744
}
3845

3946
impl<T> Service<Uri> for HttpsConnector<T>

0 commit comments

Comments
 (0)