pub fn new(db_url: &str) -> Result<PostgresMiddleware, Box<dyn Error>> {
        let manager = (PostgresConnectionManager::new(db_url, TlsMode::None))?;
        let pool = Pool::new(manager);

        Ok(PostgresMiddleware {
            pool: pool.ok().unwrap(),
        })
    }
/// Create middleware using defaults
///
/// The middleware will be setup with no ssl and the r2d2 defaults.
Create middleware using defaults
The middleware will be setup with no ssl and the r2d2 defaults.
Create middleware using defaults The middleware will be setup with no ssl and the r2d2 defaults .
pub fn new(db_url: &str) -> Result<PostgresMiddleware, Box<dyn Error>> {
        let manager = (PostgresConnectionManager::new(db_url, TlsMode::None))?;
        let pool = Pool::new(manager);
        Ok(PostgresMiddleware {
            pool: pool.ok().unwrap(),
        })
    }
pub fn new ( db_url : & str ) -> Result < PostgresMiddleware , Box < dyn Error > > { let manager = ( PostgresConnectionManager :: new ( db_url , TlsMode :: None ) ) ? ; let pool = Pool :: new ( manager ) ; Ok ( PostgresMiddleware { pool : pool . ok ( ) . unwrap ( ) , } ) }
Create middleware using defaults
The middleware will be setup with no ssl and the r2d2 defaults.
Create middleware using defaults The middleware will be setup with no ssl and the r2d2 defaults .
db_url
&str
db_url
&str