Struct hyper_client_io_wizard::builder::TlsBuilder
source · 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 (or the function will panic) 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 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