#[non_exhaustive]pub struct TlsConfig {
pub rustls_config: Arc<ClientConfig>,
}Available on crate feature
rustls only.Expand description
Config for TLS.
See rustls::client::ClientConfig documentation
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.rustls_config: Arc<ClientConfig>Implementations§
Source§impl TlsConfig
impl TlsConfig
Sourcepub fn new(rustls_config: Arc<ClientConfig>) -> Self
pub fn new(rustls_config: Arc<ClientConfig>) -> Self
Wraps a rustls::ClientConfig built elsewhere.
default trusts the platform’s roots, which is what a
publicly-signed certificate needs. This is the way in for anything else:
a private CA, a client certificate, a pinned issuer. The struct is
#[non_exhaustive], so this is also the only way to build one from
outside the crate.
Trait Implementations§
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