pub trait Connect: Sync + Send {
// Required method
fn connect(
&self,
pg_config: &PgConfig,
) -> Pin<Box<dyn Future<Output = Result<(PgClient, JoinHandle<()>), Error>> + Send + '_>>;
}Expand description
Describes a mechanism for establishing a connection to a PostgreSQL
server via tokio_postgres.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl<T> Connect for ConfigConnectImpl<T>where
T: MakeTlsConnect<Socket> + Clone + Sync + Send + 'static,
T::Stream: Sync + Send,
T::TlsConnect: Sync + Send,
<T::TlsConnect as TlsConnect<Socket>>::Future: Send,
Available on non-WebAssembly only.