#[non_exhaustive]pub enum TlsConfig {
Default,
Rustls(RustlsClientConfig),
}Expand description
TLS configuration for encrypted transports.
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.
Default
Backend defaults: rustls with the platform’s native root certificates.
Requires the tls-rustls (or tls-rustls-no-provider) feature.
Caveat: building the default config happens inside the backend and can
panic at connect time if the platform certificate store is unreadable,
or (under tls-rustls-no-provider) if no process-level rustls crypto
provider is installed. Supply an explicit TlsConfig::Rustls to
stay in full control.
Rustls(RustlsClientConfig)
A caller-supplied rustls ClientConfig (custom roots, client auth, …).
Trait Implementations§
Source§impl From<ClientConfig> for TlsConfig
Available on crate features tls-rustls-no-provider or tls-rustls only.
impl From<ClientConfig> for TlsConfig
Available on crate features
tls-rustls-no-provider or tls-rustls only.Source§fn from(config: ClientConfig) -> TlsConfig
fn from(config: ClientConfig) -> TlsConfig
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for TlsConfig
impl !UnwindSafe 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