pub struct PoolRefOwned<M: Manager> { /* private fields */ }
Implementations§
Source§impl<M: Manager> PoolRefOwned<M>
impl<M: Manager> PoolRefOwned<M>
Sourcepub fn get_conn(&mut self) -> &mut M::Connection
pub fn get_conn(&mut self) -> &mut M::Connection
get a mut reference of connection.
Sourcepub fn take_conn(&mut self) -> Option<M::Connection>
pub fn take_conn(&mut self) -> Option<M::Connection>
take the the ownership of connection from pool and it won’t be pushed back to pool anymore.
Sourcepub fn push_conn(&mut self, conn: M::Connection)
pub fn push_conn(&mut self, conn: M::Connection)
manually push a connection to pool. We treat this connection as a new born one.
operation will fail if the pool is already in full capacity(no error will return and this connection will be dropped silently)
Trait Implementations§
Source§impl<M: Manager> Deref for PoolRefOwned<M>
impl<M: Manager> Deref for PoolRefOwned<M>
Source§impl<M: Manager> DerefMut for PoolRefOwned<M>
impl<M: Manager> DerefMut for PoolRefOwned<M>
Auto Trait Implementations§
impl<M> Freeze for PoolRefOwned<M>
impl<M> !RefUnwindSafe for PoolRefOwned<M>
impl<M> Send for PoolRefOwned<M>
impl<M> Sync for PoolRefOwned<M>
impl<M> Unpin for PoolRefOwned<M>
impl<M> !UnwindSafe for PoolRefOwned<M>
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