pub enum SslMode {
Disable,
Prefer,
Require,
VerifyCa,
VerifyFull,
}Expand description
SSL mode for connections.
With the default tls cargo feature, Require/VerifyCa/VerifyFull
establish rustls-encrypted connections verified against the Mozilla root
store. Prefer uses TLS when the server offers it and falls back to
plaintext only when the server declines TLS (note: stricter than libpq —
a certificate verification failure fails the connection rather than
retrying plaintext). Without the tls feature, TLS-requiring modes fail
at pool build time.
Variants§
Disable
Disable SSL.
Prefer
Prefer SSL but allow non-SSL when the server declines TLS.
Require
Require SSL. Certificates are verified (chain + hostname) — stricter
than libpq’s require, which skips verification.
VerifyCa
Require SSL and verify the certificate chain. Currently also verifies
the hostname (i.e. behaves as VerifyFull; libpq’s hostname-less
verify-ca is not yet distinguished).
VerifyFull
Require SSL and verify the certificate chain and 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.