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 authored and cpu committed Mar 20, 2024
1 parent 68c7d05 commit 4030f86
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 @@ -28,6 +28,13 @@ pub struct HttpsConnector<T> {
}

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

/// Force the use of HTTPS when connecting.
///
/// If a URL is not `https` when connecting, an error is returned.
Expand Down

0 comments on commit 4030f86

Please sign in to comment.