pub struct TlsConnectorBuilderBox(/* private fields */);
Expand description
TlsConnector
without type parameter.
Implementation can be switched without parameterizing every function.
Implementations§
Source§impl TlsConnectorBuilderBox
impl TlsConnectorBuilderBox
Sourcepub fn build(self) -> Result<TlsConnectorBox>
pub fn build(self) -> Result<TlsConnectorBox>
Build a connector.
Sourcepub fn set_alpn_protocols(&mut self, protocols: &[&[u8]]) -> Result<()>
pub fn set_alpn_protocols(&mut self, protocols: &[&[u8]]) -> Result<()>
Set ALPN-protocols to negotiate.
This operations fails is not TlsConnector::SUPPORTS_ALPN
.
Sourcepub fn set_verify_hostname(&mut self, verify: bool) -> Result<()>
pub fn set_verify_hostname(&mut self, verify: bool) -> Result<()>
Should hostname verification be performed? Use carefully, it opens the door to MITM attacks.
Sourcepub fn add_root_certificate(&mut self, cert: &[u8]) -> Result<()>
pub fn add_root_certificate(&mut self, cert: &[u8]) -> Result<()>
Add trusted certificate (e. g. CA).
Auto Trait Implementations§
impl Freeze for TlsConnectorBuilderBox
impl !RefUnwindSafe for TlsConnectorBuilderBox
impl Send for TlsConnectorBuilderBox
impl !Sync for TlsConnectorBuilderBox
impl Unpin for TlsConnectorBuilderBox
impl !UnwindSafe for TlsConnectorBuilderBox
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