pub enum PgTlsMode {
Disable,
Require(TlsConnector),
}Expand description
TLS mode for PostgreSQL connections.
Disable uses plaintext connections (tokio_postgres::NoTls) — the
pre-v1.4 default, kept for backward compatibility.
Require enforces TLS via the platform’s native TLS implementation
(SChannel on Windows, OpenSSL on Linux, Secure Transport on macOS). The
connector is cloned per pool acquisition, so it must be Clone
(native_tls::TlsConnector satisfies this).
Variants§
Disable
Plaintext connection (backward compatible with v1.3).
Require(TlsConnector)
Enforce TLS using the provided native_tls::TlsConnector.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PgTlsMode
impl RefUnwindSafe for PgTlsMode
impl Send for PgTlsMode
impl Sync for PgTlsMode
impl Unpin for PgTlsMode
impl UnsafeUnpin for PgTlsMode
impl UnwindSafe for PgTlsMode
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