cdbc-pg 0.1.22

Rust Coroutine Database Driver Connectivity
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std::time::Duration;
use cdbc::connection::ConnectOptions;
use cdbc::error::Error;
use crate::{PgConnectOptions, PgConnection};
impl ConnectOptions for PgConnectOptions {
    type Connection = PgConnection;

    fn connect(&self,d:Duration) -> Result<Self::Connection, Error>
    where
        Self::Connection: Sized,
    {
       PgConnection::establish(self,d)
    }
}