pub enum PostgresConnector {
Plaintext,
Tls(Box<MakeRustlsConnect>),
}Expand description
The connector a pool creates connections with.
Two variants rather than one boxed trait object because NoTls and
MakeRustlsConnect are distinct MakeTlsConnect implementations and deadpool’s
create_pool is generic over them.
Variants§
Plaintext
Cleartext (sslmode = disable).
Tls(Box<MakeRustlsConnect>)
TLS via rustls.
Boxed because MakeRustlsConnect embeds a full rustls ClientConfig, which
would otherwise make every PostgresConnector (and the Result carrying it)
as large as the largest variant.
Auto Trait Implementations§
impl !RefUnwindSafe for PostgresConnector
impl !UnwindSafe for PostgresConnector
impl Freeze for PostgresConnector
impl Send for PostgresConnector
impl Sync for PostgresConnector
impl Unpin for PostgresConnector
impl UnsafeUnpin for PostgresConnector
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