fn from_str(connection_info: &str) -> Result<Self> {
        let client = Client::connect(connection_info, NoTls).unwrap();
        let conn_config = connection_info.parse::<ConnConfig>().unwrap();

        Ok(Self {
            connection_info: connection_info.to_owned(),
            client,
            conn_config,
        })
    }
/// Connection by a connection string.
///
/// ```
/// use grant::connection::DbConnection;
/// use std::str::FromStr;
///
/// let connection_info = "postgres://postgres:postgres@localhost:5432/postgres";
/// let mut client = DbConnection::from_str(connection_info).unwrap();
/// client.query("SELECT 1", &[]).unwrap();
/// ```
Connection by a connection string.


Connection by a connection string .
fn from_str(connection_info: &str) -> Result<Self> {
        let client = Client::connect(connection_info, NoTls).unwrap();
        let conn_config = connection_info.parse::<ConnConfig>().unwrap();
        Ok(Self {
            connection_info: connection_info.to_owned(),
            client,
            conn_config,
        })
    }
fn from_str ( connection_info : & str ) -> Result < Self > { let client = Client :: connect ( connection_info , NoTls ) . unwrap ( ) ; let conn_config = connection_info . parse :: < ConnConfig > ( ) . unwrap ( ) ; Ok ( Self { connection_info : connection_info . to_owned ( ) , client , conn_config , } ) }
Connection by a connection string.
Connection by a connection string .
connection_info
&str
connection_info
&str