[][src]Function tokio_postgres::connect

pub async fn connect<'_, T>(
    config: &'_ str,
    tls: T
) -> Result<(Client, Connection<Socket, T::Stream>), Error> where
    T: MakeTlsConnect<Socket>, 

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).