pub struct TlsConfig {
pub connector: TlsConnector,
pub hostnames: TlsHostMapping,
}Expand description
TLS configuration for a client.
Note: the hostnames field is only necessary to use with certain clustered deployments.
let config = TlsConfig {
// or use `TlsConnector::default_rustls()`
connector: TlsConnector::default_native_tls().unwrap(),
hostnames: TlsHostMapping::None
};
// or use the shorthand
let config: TlsConfig = TlsConnector::default_native_tls()?.into();
let config: TlsConfig = TlsConnector::default_rustls()?.into();Fields§
§connector: TlsConnectorThe TLS connector from either native-tls or rustls.
hostnames: TlsHostMappingThe hostname modification or mapping policy to use when discovering and connecting to cluster nodes.
Trait Implementations§
impl Eq for TlsConfig
impl StructuralPartialEq for TlsConfig
Auto Trait Implementations§
impl !RefUnwindSafe for TlsConfig
impl !UnwindSafe for TlsConfig
impl Freeze for TlsConfig
impl Send for TlsConfig
impl Sync for TlsConfig
impl Unpin for TlsConfig
impl UnsafeUnpin for TlsConfig
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