tokio_postgres

Function connect

source
pub async fn connect<T>(
    config: &str,
    tls: T,
) -> Result<(Client, Connection<Socket, T::Stream>), Error>
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).