Function tokio_postgres::connect
source ยท pub async fn connect<T>(
config: &str,
tls: T,
) -> Result<(Client, Connection<Socket, T::Stream>), Error>where
T: MakeTlsConnect<Socket>,
Expand description
A convenience function which parses a connection string and connects to the database.
See the documentation for Config
for details on the connection string format.
Requires the runtime
Cargo feature (enabled by default).