Skip to content

Commit

Permalink
feat: add a builder() method to HttpsConnector
Browse files Browse the repository at this point in the history
It's become very idiomatic to have the builder api be accessed this way.
  • Loading branch information
Fishrock123 committed Mar 15, 2024
1 parent 68c7d05 commit 956111f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/connector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ impl<T> HttpsConnector<T> {
pub fn enforce_https(&mut self) {
self.force_https = true;
}

/// Creates a [`builder::HttpsConnectorBuilder`] to configure a `HttpsConnector`.
///
/// This is the same as [`builder::HttpsConnectorBuilder::new()`].
pub fn builder() -> builder::ConnectorBuilder<builder::WantsTlsConfig> {
builder::ConnectorBuilder::new()
}
}

impl<T> Service<Uri> for HttpsConnector<T>
Expand Down

0 comments on commit 956111f

Please sign in to comment.