#[non_exhaustive]pub enum TlsConfig {
Rustls(Arc<ClientConfig>),
NativeTls(TlsConnector),
}Expand description
A TLS client configuration for one of the compiled-in backends.
Built from a backend type with From (rustls::ClientConfig, Arc<rustls::ClientConfig>,
native_tls::TlsConnector), or with TlsConfig::with_root_certificates_pem for a private CA.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Rustls(Arc<ClientConfig>)
Available on crate feature
rustls only.A rustls client configuration.
NativeTls(TlsConnector)
Available on crate feature
native-tls only.A native-tls connector.
Implementations§
Trait Implementations§
Source§impl From<Arc<ClientConfig>> for TlsConfig
Available on crate feature rustls only.
impl From<Arc<ClientConfig>> for TlsConfig
Available on crate feature
rustls only.Source§fn from(config: Arc<ClientConfig>) -> Self
fn from(config: Arc<ClientConfig>) -> Self
Converts to this type from the input type.
Source§impl From<ClientConfig> for TlsConfig
Available on crate feature rustls only.
impl From<ClientConfig> for TlsConfig
Available on crate feature
rustls only.Source§fn from(config: ClientConfig) -> Self
fn from(config: ClientConfig) -> Self
Converts to this type from the input type.
Source§impl From<TlsConnector> for TlsConfig
Available on crate feature native-tls only.
impl From<TlsConnector> for TlsConfig
Available on crate feature
native-tls only.Source§fn from(connector: TlsConnector) -> Self
fn from(connector: TlsConnector) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for TlsConfig
impl !UnwindSafe for TlsConfig
impl Forget for TlsConfig
impl Freeze for TlsConfig
impl Send for TlsConfig
impl Sync for TlsConfig
impl Unpin for TlsConfig
impl UnsafeUnpin for TlsConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more