Introduction

If you use postgres's service feature for configuring your connections, then this is the library for you.

This is for use with the Postgres crate.

Example

This example uses the service name mydb and overrides the user value, then makes the connection.

extern crate postgres_service;
extern crate postgres;

let conn = postgres::Connection::connect(
    ev::pg_service::load_connect_params("mydb")
        .unwrap().user("your_user_name"),
    postgres::TlsMode::None
).unwrap();