Struct mysql_async::Pool
source · pub struct Pool { /* private fields */ }
Expand description
Asynchronous pool of MySql connections.
Implementations§
source§impl Pool
impl Pool
sourcepub fn start_transaction(
&self,
options: TransactionOptions
) -> impl MyFuture<Transaction<Conn>>
pub fn start_transaction(
&self,
options: TransactionOptions
) -> impl MyFuture<Transaction<Conn>>
Shortcut for get_conn
followed by start_transaction
.
sourcepub fn disconnect(self) -> DisconnectPool
pub fn disconnect(self) -> DisconnectPool
Returns future that disconnects this pool from server and resolves to ()
.
Active connections taken from this pool should be disconnected manually.
Also all pending and new GetConn
’s will resolve to error.