Skip to content

Commit 956111f

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 956111f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Diff for: 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 [`builder::HttpsConnectorBuilder`] to configure a `HttpsConnector`.
39+
///
40+
/// This is the same as [`builder::HttpsConnectorBuilder::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)