[−][src]Struct bb8_memcached::MemcachePool
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]
&'_ self
) -> Result<PooledConnection<'_, MemcacheConnectionManager>, RunError<Error>>
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]
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,
Run the function with a connection provided by the pool.
Trait Implementations
impl Clone for MemcachePool
[src]
fn clone(&self) -> MemcachePool
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for MemcachePool
[src]
Auto Trait Implementations
impl !RefUnwindSafe for MemcachePool
impl Send for MemcachePool
impl Sync for MemcachePool
impl Unpin for MemcachePool
impl !UnwindSafe for MemcachePool
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,