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 82253dc1c8db16f941037f7c073ab9f442a97400..76eb1fc50f20ed06094499840f49459a4ba2df4a 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 ///