pub struct TlsBuilder { /* private fields */ }
Implementations§
Source§impl TlsBuilder
impl TlsBuilder
Sourcepub fn tls_config(self, config: ClientConfig) -> Result<TlsBuilderConfig, Error>
pub fn tls_config(self, config: ClientConfig) -> Result<TlsBuilderConfig, Error>
Passes a rustls [ClientConfig
] to configure the TLS connection
The alpn_protocols
field is
required to be empty and will be rewritten to match the enabled
schemes (see
enable_http1
,
enable_http2
) before the
connector is built.
Sourcepub fn native_roots(self) -> Result<TlsBuilderConfig, Error>
pub fn native_roots(self) -> Result<TlsBuilderConfig, Error>
Shorthand for using rustls safe defaults and native roots
Sourcepub fn webpki_roots(self) -> Result<TlsBuilderConfig, Error>
pub fn webpki_roots(self) -> Result<TlsBuilderConfig, Error>
Shorthand for using rustls safe defaults and Mozilla roots
Auto Trait Implementations§
impl !Freeze for TlsBuilder
impl RefUnwindSafe for TlsBuilder
impl Send for TlsBuilder
impl Sync for TlsBuilder
impl Unpin for TlsBuilder
impl UnwindSafe for TlsBuilder
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