From 65eb0e0b29b87edc1cb05fddb6ec4718e291d136 Mon Sep 17 00:00:00 2001 From: Simon Buttgereit Date: Thu, 11 Jul 2024 15:50:43 +0200 Subject: [PATCH] expose api --- .../aws-smithy-experimental/src/hyper_1_0.rs | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/rust-runtime/aws-smithy-experimental/src/hyper_1_0.rs b/rust-runtime/aws-smithy-experimental/src/hyper_1_0.rs index 82253dc1c..76eb1fc50 100644 --- a/rust-runtime/aws-smithy-experimental/src/hyper_1_0.rs +++ b/rust-runtime/aws-smithy-experimental/src/hyper_1_0.rs @@ -640,6 +640,33 @@ pub struct HyperClientBuilder { crypto_provider: Crypto, } +impl HyperClientBuilder { + pub fn build(self, tcp_connector: F) -> SharedHttpClient + where + F: Fn() -> C + Send + Sync + 'static, + C: Clone + Send + Sync + 'static, + C: tower::Service, + C::Response: Connection + Read + Write + Send + Sync + Unpin + 'static, + C::Future: Unpin + Send + 'static, + C::Error: Into, + C: Connect, + { + self.build_with_fn(tcp_connector) + } + pub fn build_with_fn(self, tcp_connector: F) -> SharedHttpClient + where + F: Fn() -> C + Send + Sync + 'static, + C: Clone + Send + Sync + 'static, + C: tower::Service, + C::Response: Connection + Read + Write + Send + Sync + Unpin + 'static, + C::Future: Unpin + Send + 'static, + C::Error: Into, + C: Connect, + { + build_with_fn(self.client_builder, tcp_connector) + } +} + impl HyperClientBuilder { /// Create a hyper client using RusTLS for TLS /// -- GitLab