pub struct TlsClientConfig { /* private fields */ }Expand description
Trusted roots and HTTP/2 ALPN policy for synchronous TLS clients.
Implementations§
Source§impl TlsClientConfig
impl TlsClientConfig
Sourcepub fn new(roots: RootCertStore) -> Result<Self>
pub fn new(roots: RootCertStore) -> Result<Self>
Builds a TLS 1.3 client with certificate and server-name verification.
§Errors
Returns an error if the TLS provider cannot support TLS 1.3.
Sourcepub fn from_rustls(config: ClientConfig) -> Self
pub fn from_rustls(config: ClientConfig) -> Self
Uses a caller’s certificate policy, requiring HTTP/2 and disabling 0-RTT.
The caller remains responsible for the supplied configuration’s verifier, protocol versions, and cryptographic provider.
Sourcepub fn get_ref(&self) -> &ClientConfig
pub fn get_ref(&self) -> &ClientConfig
Returns the immutable rustls configuration.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for TlsClientConfig
impl !UnwindSafe for TlsClientConfig
impl Freeze for TlsClientConfig
impl Send for TlsClientConfig
impl Sync for TlsClientConfig
impl Unpin for TlsClientConfig
impl UnsafeUnpin for TlsClientConfig
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