Add a missing impl<T> IntoEndpoint for (T, native_tls::TlsConnector)
for the any engine (#1885)
This commit is contained in:
parent
91e949248d
commit
59947749e3
1 changed files with 14 additions and 0 deletions
|
@ -140,6 +140,20 @@ impl IntoEndpoint for String {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "native-tls")]
|
||||||
|
#[cfg_attr(docsrs, doc(cfg(feature = "native-tls")))]
|
||||||
|
impl<T> IntoEndpoint for (T, native_tls::TlsConnector)
|
||||||
|
where
|
||||||
|
T: Into<String>,
|
||||||
|
{
|
||||||
|
fn into_endpoint(self) -> Result<Endpoint> {
|
||||||
|
let (address, config) = self;
|
||||||
|
let mut address = address.into().into_endpoint()?;
|
||||||
|
address.tls_config = Some(Tls::Native(config));
|
||||||
|
Ok(address)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(feature = "rustls")]
|
#[cfg(feature = "rustls")]
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "rustls")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "rustls")))]
|
||||||
impl<T> IntoEndpoint for (T, rustls::ClientConfig)
|
impl<T> IntoEndpoint for (T, rustls::ClientConfig)
|
||||||
|
|
Loading…
Reference in a new issue