pub enum MiddlewarePool {
Postgres(Pool),
Sqlite(Pool),
}
Expand description
Connection pool for database access
This enum wraps the different connection pool types for the supported database engines.
Variants§
Implementations§
Source§impl MiddlewarePool
impl MiddlewarePool
pub async fn get(&self) -> Result<&MiddlewarePool, SqlMiddlewareDbError>
pub async fn get_connection( pool: &MiddlewarePool, ) -> Result<MiddlewarePoolConnection, SqlMiddlewareDbError>
Trait Implementations§
Source§impl Clone for MiddlewarePool
impl Clone for MiddlewarePool
Source§fn clone(&self) -> MiddlewarePool
fn clone(&self) -> MiddlewarePool
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for MiddlewarePool
impl !RefUnwindSafe for MiddlewarePool
impl Send for MiddlewarePool
impl Sync for MiddlewarePool
impl Unpin for MiddlewarePool
impl !UnwindSafe for MiddlewarePool
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more