pub struct DbTls {
pub mode: DbSslMode,
pub root_cert: Option<String>,
pub client_cert: Option<String>,
pub client_key: Option<String>,
}Available on crate features
model-mysql or model-postgres or model-sqlite only.Expand description
How a PostgreSQL or MySQL connection uses TLS (ignored for SQLite).
Separate from DbConfig so code that builds a DbConfig literal keeps
compiling; DbPool::from_env reads both, and
DbPool::new_with_tls takes both.
| Variable | Default |
|---|---|
RWS_DB_SSL_MODE | prefer |
RWS_DB_SSL_ROOT_CERT | (none: the system’s roots) |
RWS_DB_SSL_CLIENT_CERT | (none) |
RWS_DB_SSL_CLIENT_KEY | (none) |
Fields§
§mode: DbSslModeWhen to use TLS and what to check.
root_cert: Option<String>PEM file with the CA certificates that sign the server’s certificate (a managed database’s private CA).
client_cert: Option<String>PEM client certificate, for servers that require one.
client_key: Option<String>PEM private key of client_cert.
Implementations§
Trait Implementations§
impl StructuralPartialEq for DbTls
Auto Trait Implementations§
impl Freeze for DbTls
impl RefUnwindSafe for DbTls
impl Send for DbTls
impl Sync for DbTls
impl Unpin for DbTls
impl UnsafeUnpin for DbTls
impl UnwindSafe for DbTls
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more