pub enum SslMode {
Disable,
Prefer,
Require,
VerifyCa,
VerifyFull,
}Expand description
SSL mode for PostgreSQL connections.
Variants§
Disable
Do not use SSL
Prefer
Try SSL, fall back to non-SSL if unavailable
Require
Require SSL connection
VerifyCa
Require SSL and verify server certificate
VerifyFull
Require SSL and verify server certificate matches hostname
Implementations§
Source§impl SslMode
impl SslMode
Sourcepub const fn should_try_ssl(self) -> bool
pub const fn should_try_ssl(self) -> bool
Check if SSL should be attempted.
Sourcepub const fn is_required(self) -> bool
pub const fn is_required(self) -> bool
Check if SSL is required.
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 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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).