Add support for both rustls and tlsnative

This commit is contained in:
Paul Fariello 2021-02-15 19:59:46 +01:00 committed by Astro
commit ae52f6444d
5 changed files with 58 additions and 14 deletions

View file

@ -1,3 +1,4 @@
#[cfg(feature = "tls-native")]
use native_tls::Error as TlsError;
use sasl::client::MechanismError as SaslMechanismError;
use std::borrow::Cow;
@ -5,6 +6,8 @@ use std::error::Error as StdError;
use std::fmt;
use std::io::Error as IoError;
use std::str::Utf8Error;
#[cfg(feature = "tls-rust")]
use tokio_rustls::rustls::TLSError as TlsError;
use trust_dns_proto::error::ProtoError;
use trust_dns_resolver::error::ResolveError;