[][src]Struct bb8_memcached::MemcachePool

pub struct MemcachePool { /* fields omitted */ }

MemcachePool is a convenience wrapper around bb8::Pool that hides the fact that RedisConnectionManager uses an Option<Connection> to smooth over the API incompatibility.

Implementations

impl MemcachePool[src]

pub fn new(pool: Pool<MemcacheConnectionManager>) -> MemcachePool[src]

pub fn pool(&self) -> &Pool<MemcacheConnectionManager>[src]

Access the bb8::Pool directly.

pub async fn get<'_, '_>(
    &'_ self
) -> Result<PooledConnection<'_, MemcacheConnectionManager>, RunError<Error>>
[src]

Retrieve the pooled connection

pub async fn run<'a, '_, T, E, U, F>(&'_ self, f: F) -> Result<T, RunError<E>> where
    F: FnOnce(Connection) -> U + Send + 'a,
    U: Future<Output = Result<(Connection, T), E>> + Send + 'a,
    E: From<<MemcacheConnectionManager as ManageConnection>::Error> + Send + 'a,
    T: Send + 'a, 
[src]

Run the function with a connection provided by the pool.

Trait Implementations

impl Clone for MemcachePool[src]

impl Debug for MemcachePool[src]

Auto Trait Implementations

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.