Struct redis_tang::PoolRef
source · [−]pub struct PoolRef<'a, M> where
M: Manager, { /* private fields */ }
Implementations
sourceimpl<'_, M> PoolRef<'_, M> where
M: Manager,
impl<'_, M> PoolRef<'_, M> where
M: Manager,
sourcepub fn get_conn(&mut self) -> &mut <M as Manager>::Connection
pub fn get_conn(&mut self) -> &mut <M as Manager>::Connection
get a mut reference of connection.
sourcepub fn take_conn(&mut self) -> Option<<M as Manager>::Connection>
pub fn take_conn(&mut self) -> Option<<M as Manager>::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 as Manager>::Connection)
pub fn push_conn(&mut self, conn: <M as Manager>::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)
pub fn get_manager(&self) -> &M
Trait Implementations
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>
impl<'a, M> !UnwindSafe for PoolRef<'a, M>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more