Enum rbatis::db::DBPool [−][src]
pub enum DBPool {
None,
Mysql(Pool<MySql>, Arc<Box<dyn DataDecoder + 'static, Global>>),
Postgres(Pool<Postgres>, Arc<Box<dyn DataDecoder + 'static, Global>>),
Sqlite(Pool<Sqlite>, Arc<Box<dyn DataDecoder + 'static, Global>>),
Mssql(Pool<Mssql>, Arc<Box<dyn DataDecoder + 'static, Global>>),
}
Variants
None
Mysql(Pool<MySql>, Arc<Box<dyn DataDecoder + 'static, Global>>)
Postgres(Pool<Postgres>, Arc<Box<dyn DataDecoder + 'static, Global>>)
Sqlite(Pool<Sqlite>, Arc<Box<dyn DataDecoder + 'static, Global>>)
Mssql(Pool<Mssql>, Arc<Box<dyn DataDecoder + 'static, Global>>)
Implementations
pub async fn new_opt(
driver: &'_ DBConnectOption,
opt: DBPoolOptions
) -> Result<DBPool, Error>
Retrieves a connection from the pool.
Waits for at most the configured connection timeout before returning an error.
Attempts to retrieve a connection from the pool if there is one available.
Returns None
immediately if there are no idle connections available in the pool.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for DBPool
impl !UnwindSafe for DBPool
Blanket Implementations
Mutably borrows from an owned value. Read more