pub enum MySqlSslMode {
Disabled,
Preferred,
Required,
VerifyCa,
VerifyIdentity,
}
Expand description
Options for controlling the desired security state of the connection to the MySQL server.
It is used by the ssl_mode
method.
url example: ?ssl-mode=disabled or ?ssl-mode=preferred or ?ssl-mode=required
Variants§
Disabled
Establish an unencrypted connection.
This is the default if ssl-mode
is not specified.
Preferred
Establish an encrypted connection if the server supports encrypted connections, falling back to an unencrypted connection if an encrypted connection cannot be established.
Required
Establish an encrypted connection if the server supports encrypted connections. The connection attempt fails if an encrypted connection cannot be established.
VerifyCa
Like Required
, but additionally verify the server Certificate Authority (CA)
certificate against the configured CA certificates. The connection attempt fails
if no valid matching CA certificates are found.
VerifyIdentity
Like VerifyCa
, but additionally perform host name identity verification by
checking the host name the client uses for connecting to the server against the
identity in the certificate that the server sends to the client.
Trait Implementations§
Source§impl Clone for MySqlSslMode
impl Clone for MySqlSslMode
Source§fn clone(&self) -> MySqlSslMode
fn clone(&self) -> MySqlSslMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for MySqlSslMode
impl Debug for MySqlSslMode
Source§impl Default for MySqlSslMode
impl Default for MySqlSslMode
Source§impl<'de> Deserialize<'de> for MySqlSslMode
impl<'de> Deserialize<'de> for MySqlSslMode
Source§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>,
Source§impl FromStr for MySqlSslMode
impl FromStr for MySqlSslMode
Source§impl Serialize for MySqlSslMode
impl Serialize for MySqlSslMode
impl Copy for MySqlSslMode
Auto Trait Implementations§
impl Freeze for MySqlSslMode
impl RefUnwindSafe for MySqlSslMode
impl Send for MySqlSslMode
impl Sync for MySqlSslMode
impl Unpin for MySqlSslMode
impl UnwindSafe for MySqlSslMode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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