pub enum TlsConnector {
Native(TlsConnector),
Rustls(TlsConnector),
}Expand description
An enum for interacting with various TLS libraries and interfaces.
Variants§
Native(TlsConnector)
Rustls(TlsConnector)
Implementations§
Source§impl TlsConnector
impl TlsConnector
Sourcepub fn default_native_tls() -> Result<TlsConnector, Error>
pub fn default_native_tls() -> Result<TlsConnector, Error>
Create a default TLS connector from the native-tls module.
Sourcepub fn default_rustls() -> Result<TlsConnector, Error>
pub fn default_rustls() -> Result<TlsConnector, Error>
Create a default TLS connector with the rustls module with safe defaults and system certs via rustls-native-certs.
Trait Implementations§
Source§impl Clone for TlsConnector
impl Clone for TlsConnector
Source§fn clone(&self) -> TlsConnector
fn clone(&self) -> TlsConnector
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TlsConnector
impl Debug for TlsConnector
impl Eq for TlsConnector
Source§impl From<ClientConfig> for TlsConnector
Available on crate features enable-rustls-ring or enable-rustls only.
impl From<ClientConfig> for TlsConnector
Available on crate features
enable-rustls-ring or enable-rustls only.Source§fn from(config: ClientConfig) -> TlsConnector
fn from(config: ClientConfig) -> TlsConnector
Converts to this type from the input type.
Source§impl From<TlsConnector> for TlsConnector
Available on crate feature enable-native-tls only.
impl From<TlsConnector> for TlsConnector
Available on crate feature
enable-native-tls only.Source§fn from(connector: TlsConnector) -> TlsConnector
fn from(connector: TlsConnector) -> TlsConnector
Converts to this type from the input type.
Source§impl From<TlsConnector> for TlsConnector
Available on crate feature enable-native-tls only.
impl From<TlsConnector> for TlsConnector
Available on crate feature
enable-native-tls only.Source§fn from(connector: TlsConnector) -> TlsConnector
fn from(connector: TlsConnector) -> TlsConnector
Converts to this type from the input type.
Source§impl From<TlsConnector> for TlsConnector
Available on crate features enable-rustls-ring or enable-rustls only.
impl From<TlsConnector> for TlsConnector
Available on crate features
enable-rustls-ring or enable-rustls only.Source§fn from(connector: TlsConnector) -> TlsConnector
fn from(connector: TlsConnector) -> TlsConnector
Converts to this type from the input type.
Source§impl PartialEq for TlsConnector
impl PartialEq for TlsConnector
Source§impl TryFrom<TlsConnectorBuilder> for TlsConnector
Available on crate feature enable-native-tls only.
impl TryFrom<TlsConnectorBuilder> for TlsConnector
Available on crate feature
enable-native-tls only.Source§fn try_from(
builder: TlsConnectorBuilder,
) -> Result<TlsConnector, <TlsConnector as TryFrom<TlsConnectorBuilder>>::Error>
fn try_from( builder: TlsConnectorBuilder, ) -> Result<TlsConnector, <TlsConnector as TryFrom<TlsConnectorBuilder>>::Error>
Performs the conversion.
Auto Trait Implementations§
impl !RefUnwindSafe for TlsConnector
impl !UnwindSafe for TlsConnector
impl Freeze for TlsConnector
impl Send for TlsConnector
impl Sync for TlsConnector
impl Unpin for TlsConnector
impl UnsafeUnpin for TlsConnector
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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