Struct mungos::options::TlsOptions
source · [−]#[non_exhaustive]pub struct TlsOptions {
pub allow_invalid_certificates: Option<bool>,
pub ca_file_path: Option<PathBuf>,
pub cert_key_file_path: Option<PathBuf>,
}
Expand description
Specifies the TLS configuration that the Client
should use.
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.allow_invalid_certificates: Option<bool>
Whether or not the Client
should return an error if the server
presents an invalid certificate. This setting should not be set to true
in
production; it should only be used for testing.
The default value is to error when the server presents an invalid certificate.
ca_file_path: Option<PathBuf>
The path to the CA file that the Client
should use for TLS. If
none is specified, then the driver will use the Mozilla root certificates from the
webpki-roots
crate.
cert_key_file_path: Option<PathBuf>
The path to the certificate file that the Client
should present
to the server to verify its identify. If none is specified, then the
Client
will not attempt to verify its identity to the
server.
Implementations
sourceimpl TlsOptions
impl TlsOptions
sourcepub fn builder() -> TlsOptionsBuilder<((), (), ())>
pub fn builder() -> TlsOptionsBuilder<((), (), ())>
Create a builder for building TlsOptions
.
On the builder, call .allow_invalid_certificates(...)
(optional), .ca_file_path(...)
(optional), .cert_key_file_path(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of TlsOptions
.
Trait Implementations
sourceimpl Clone for TlsOptions
impl Clone for TlsOptions
sourcefn clone(&self) -> TlsOptions
fn clone(&self) -> TlsOptions
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for TlsOptions
impl Debug for TlsOptions
sourceimpl Default for TlsOptions
impl Default for TlsOptions
sourcefn default() -> TlsOptions
fn default() -> TlsOptions
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for TlsOptions
impl<'de> Deserialize<'de> for TlsOptions
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<TlsOptions, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<TlsOptions, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl From<TlsOptions> for Tls
impl From<TlsOptions> for Tls
sourcefn from(options: TlsOptions) -> Tls
fn from(options: TlsOptions) -> Tls
Converts to this type from the input type.
sourceimpl PartialEq<TlsOptions> for TlsOptions
impl PartialEq<TlsOptions> for TlsOptions
sourcefn eq(&self, other: &TlsOptions) -> bool
fn eq(&self, other: &TlsOptions) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &TlsOptions) -> bool
fn ne(&self, other: &TlsOptions) -> bool
This method tests for !=
.
impl StructuralPartialEq for TlsOptions
Auto Trait Implementations
impl RefUnwindSafe for TlsOptions
impl Send for TlsOptions
impl Sync for TlsOptions
impl Unpin for TlsOptions
impl UnwindSafe for TlsOptions
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more