Struct PoolRefOwned

Source
pub struct PoolRefOwned<M: Manager> { /* private fields */ }

Implementations§

Source§

impl<M: Manager> PoolRefOwned<M>

Source

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

get a mut reference of connection.

Source

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.

Source

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>

Source§

type Target = <M as Manager>::Connection

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<M: Manager> DerefMut for PoolRefOwned<M>

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl<M: Manager> Drop for PoolRefOwned<M>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl<M> Freeze for PoolRefOwned<M>
where <M as Manager>::Connection: Freeze,

§

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§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.