pub struct MySqlPool {
pub pool: Arc<Pool>,
pub connection_string: String,
}
Expand description
A MySQL connection pool using mysql-async
Fields§
§pool: Arc<Pool>
The connection pool
connection_string: String
The connection string used to create this pool
Trait Implementations§
Source§impl DatabasePool for MySqlPool
impl DatabasePool for MySqlPool
type Connection = MySqlConnection
type Error = MySqlError
fn acquire<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Self::Connection, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn release<'life0, 'async_trait>(
&'life0 self,
conn: Self::Connection,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn connection_string(&self) -> String
Auto Trait Implementations§
impl Freeze for MySqlPool
impl !RefUnwindSafe for MySqlPool
impl Send for MySqlPool
impl Sync for MySqlPool
impl Unpin for MySqlPool
impl !UnwindSafe for MySqlPool
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