pub struct PoolConnection { /* private fields */ }Expand description
A connection borrowed from the pool.
Uses std::sync::Mutex for interior mutability because the driver’s
PoolGuard requires &mut self for queries, but the Executor trait
takes &self. The mutex is uncontended in practice — a single connection
is used by one caller at a time, never shared between concurrent callers.
Returned to the pool when dropped.
Trait Implementations§
Source§impl Debug for PoolConnection
impl Debug for PoolConnection
Source§impl Executor for PoolConnection
Available on non-crate feature async only.
impl Executor for PoolConnection
Available on non-crate feature
async only.fn query_raw( &self, sql: &str, sql_hash: u64, params: &[&(dyn Encode + Sync)], ) -> BsqlResult<OwnedResult>
fn query_raw_readonly( &self, sql: &str, sql_hash: u64, params: &[&(dyn Encode + Sync)], ) -> BsqlResult<OwnedResult>
fn execute_raw( &self, sql: &str, sql_hash: u64, params: &[&(dyn Encode + Sync)], ) -> BsqlResult<u64>
Auto Trait Implementations§
impl !Freeze for PoolConnection
impl RefUnwindSafe for PoolConnection
impl Send for PoolConnection
impl Sync for PoolConnection
impl Unpin for PoolConnection
impl UnsafeUnpin for PoolConnection
impl UnwindSafe for PoolConnection
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