From 1f9db89bbb633a9cf49c07219b236ef91165ef18 Mon Sep 17 00:00:00 2001 From: Jeremiah Senkpiel Date: Wed, 20 Mar 2024 12:21:18 -0700 Subject: [PATCH] feat: add a builder() method to HttpsConnector It's become very idiomatic to have the builder api be accessed this way. --- src/connector.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/connector.rs b/src/connector.rs index 60e6617..37864da 100644 --- a/src/connector.rs +++ b/src/connector.rs @@ -28,6 +28,13 @@ pub struct HttpsConnector { } impl HttpsConnector { + /// Creates a [`crate::HttpsConnectorBuilder`] to configure a `HttpsConnector`. + /// + /// This is the same as [`crate::HttpsConnectorBuilder::new()`]. + pub fn builder() -> builder::ConnectorBuilder { + builder::ConnectorBuilder::new() + } + /// Force the use of HTTPS when connecting. /// /// If a URL is not `https` when connecting, an error is returned.