pub struct TlsOptions { /* private fields */ }
Expand description
Options for tls connection.
Implementations§
source§impl TlsOptions
impl TlsOptions
sourcepub fn no_ca() -> Self
pub fn no_ca() -> Self
Tls options with no ca certificates. Use TlsOptions::default if well-known ca roots is desirable.
sourcepub unsafe fn with_no_hostname_verification(self) -> Self
pub unsafe fn with_no_hostname_verification(self) -> Self
Disables hostname verification in tls handshake.
§Safety
This exposes risk to man-in-the-middle attacks.
sourcepub fn with_pem_ca_certs(self, certs: &str) -> Result<Self, Error>
pub fn with_pem_ca_certs(self, certs: &str) -> Result<Self, Error>
Adds new ca certificates.
Trait Implementations§
source§impl Clone for TlsOptions
impl Clone for TlsOptions
source§impl Debug for TlsOptions
impl Debug for TlsOptions
Auto Trait Implementations§
impl Freeze for TlsOptions
impl RefUnwindSafe for TlsOptions
impl Send for TlsOptions
impl Sync for TlsOptions
impl Unpin for TlsOptions
impl UnwindSafe for TlsOptions
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more