pub type MysqlPool = Pool<AsyncMysqlConnection>;
Expand description
Type alias for an async
pool of MySQL connections for async
diesel.
use rocket_db_pools::{Database, Connection};
use rocket_db_pools::diesel::{MysqlPool, prelude::*};
#[derive(Database)]
#[database("my_mysql_db_name")]
struct Db(MysqlPool);
#[get("/")]
async fn use_db(mut db: Connection<Db>) {
/* .. */
}
Aliased Typeยง
struct MysqlPool { /* private fields */ }