pub enum SslMode {
Require,
VerifyCa,
VerifyFull,
}Expand description
How the client verifies the server certificate.
TLS is always required: disable and prefer (which permit plaintext) are
rejected. The default is SslMode::Require, which encrypts the
connection but does not authenticate the server — an active attacker
can impersonate it. Use SslMode::VerifyFull unless the network is
trusted.
Variants§
Require
Require TLS. The server certificate is not verified, so the
connection is encrypted but the server is unauthenticated (like
libpq’s require).
VerifyCa
Require TLS and verify the certificate chain, but not the hostname.
VerifyFull
Require TLS and verify both the certificate chain and the hostname.
Trait Implementations§
impl Copy for SslMode
impl Eq for SslMode
impl StructuralPartialEq for SslMode
Auto Trait Implementations§
impl Freeze for SslMode
impl RefUnwindSafe for SslMode
impl Send for SslMode
impl Sync for SslMode
impl Unpin for SslMode
impl UnsafeUnpin for SslMode
impl UnwindSafe for SslMode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more