Enum sqlx::mysql::MySqlSslMode
source ยท pub enum MySqlSslMode {
Disabled,
Preferred,
Required,
VerifyCa,
VerifyIdentity,
}
mysql
only.Expand description
Options for controlling the desired security state of the connection to the MySQL server.
It is used by the ssl_mode
method.
Variantsยง
Disabled
Establish an unencrypted connection.
Preferred
Establish an encrypted connection if the server supports encrypted connections, falling back to an unencrypted connection if an encrypted connection cannot be established.
This is the default if ssl_mode
is not specified.
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 more