Struct mongodb::options::TlsOptions [−][src]
#[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
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
Returns the “default value” for a type. Read more
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Performs the conversion.
Performs the conversion.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
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
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V