pub async fn create() -> Result<PgPool, DatabaseError> {
        let config = Config::load().await?;
        let pool = PgPool::connect(&config.db_url()).await?;

        Ok(pool)
    }
/// Creates a new Postgres database connection pool using the configuration
/// settings in your game/config.toml file. This can be cloned freely as it
/// is wrapped in an Arc.
Creates a new Postgres database connection pool using the configuration
settings in your game/config.toml file. This can be cloned freely as it
is wrapped in an Arc.
Creates a new Postgres database connection pool using the configuration settings in your game / config . toml file . This can be cloned freely as it is wrapped in an Arc .
pub async fn create() -> Result<PgPool, DatabaseError> {
        let config = Config::load().await?;
        let pool = PgPool::connect(&config.db_url()).await?;
        Ok(pool)
    }
pub async fn create ( ) -> Result < PgPool , DatabaseError > { let config = Config :: load ( ) . await ? ; let pool = PgPool :: connect ( & config . db_url ( ) ) . await ? ; Ok ( pool ) }
Creates a new Postgres database connection pool using the configuration
settings in your game/config.toml file.
Creates a new Postgres database connection pool using the configuration settings in your game / config . toml file .