diff --git a/lib/src/api/engine/any/mod.rs b/lib/src/api/engine/any/mod.rs index 16b6d17a..c67b7019 100644 --- a/lib/src/api/engine/any/mod.rs +++ b/lib/src/api/engine/any/mod.rs @@ -140,6 +140,20 @@ impl IntoEndpoint for String { } } +#[cfg(feature = "native-tls")] +#[cfg_attr(docsrs, doc(cfg(feature = "native-tls")))] +impl IntoEndpoint for (T, native_tls::TlsConnector) +where + T: Into, +{ + fn into_endpoint(self) -> Result { + let (address, config) = self; + let mut address = address.into().into_endpoint()?; + address.tls_config = Some(Tls::Native(config)); + Ok(address) + } +} + #[cfg(feature = "rustls")] #[cfg_attr(docsrs, doc(cfg(feature = "rustls")))] impl IntoEndpoint for (T, rustls::ClientConfig)