Struct redis_tang::PoolRefOwned
source · [−]pub struct PoolRefOwned<M> where
M: Manager, { /* private fields */ }
Implementations
sourceimpl<M> PoolRefOwned<M> where
M: Manager,
impl<M> PoolRefOwned<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)
Trait Implementations
sourceimpl<M> Deref for PoolRefOwned<M> where
M: Manager,
impl<M> Deref for PoolRefOwned<M> where
M: Manager,
type Target = <M as Manager>::Connection
type Target = <M as Manager>::Connection
The resulting type after dereferencing.
sourcefn deref(&self) -> &<PoolRefOwned<M> as Deref>::Target
fn deref(&self) -> &<PoolRefOwned<M> as Deref>::Target
Dereferences the value.
sourceimpl<M> DerefMut for PoolRefOwned<M> where
M: Manager,
impl<M> DerefMut for PoolRefOwned<M> where
M: Manager,
sourcefn deref_mut(&mut self) -> &mut <PoolRefOwned<M> as Deref>::Target
fn deref_mut(&mut self) -> &mut <PoolRefOwned<M> as Deref>::Target
Mutably dereferences the value.
Auto Trait Implementations
impl<M> !RefUnwindSafe for PoolRefOwned<M>
impl<M> Send for PoolRefOwned<M> where
<M as Manager>::Connection: Send,
impl<M> Sync for PoolRefOwned<M> where
<M as Manager>::Connection: Sync,
impl<M> Unpin for PoolRefOwned<M>
impl<M> !UnwindSafe for PoolRefOwned<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