[][src]Struct tang_rs::PoolRef

pub struct PoolRef<'a, M: Manager> { /* fields omitted */ }

Implementations

impl<'_, M: Manager> PoolRef<'_, M>[src]

pub fn get_conn(&mut self) -> &mut M::Connection[src]

get a mut reference of connection.

pub fn take_conn(&mut self) -> Option<M::Connection>[src]

take the the ownership of connection from pool and it won't be pushed back to pool anymore.

pub fn push_conn(&mut self, conn: M::Connection)[src]

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)

pub fn get_manager(&self) -> &M[src]

Trait Implementations

impl<'_, M: Manager> Deref for PoolRef<'_, M>[src]

type Target = M::Connection

The resulting type after dereferencing.

impl<'_, M: Manager> DerefMut for PoolRef<'_, M>[src]

impl<'_, M: Manager> Drop for PoolRef<'_, M>[src]

Auto Trait Implementations

impl<'a, M> !RefUnwindSafe for PoolRef<'a, M>

impl<'a, M> Send for PoolRef<'a, M> where
    <M as Manager>::Connection: Send

impl<'a, M> Sync for PoolRef<'a, M> where
    <M as Manager>::Connection: Sync

impl<'a, M> Unpin for PoolRef<'a, M> where
    <M as Manager>::Connection: Unpin

impl<'a, M> !UnwindSafe for PoolRef<'a, M>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.