Struct redis_dumbpool::Pool[][src]

pub struct Pool { /* fields omitted */ }

Redis connection pool

Implementations

impl Pool[src]

pub async fn factory(
    addr: &str,
    min: u8,
    max: u8,
    sleep: u64,
    refresh: u64
) -> RedisResult<Self>
[src]

Create a new Pool, pointing to a single Redis server, with minimum and maximum number of active connections, the amount of nanoseconds to wait between retries when the connection pool is at maximum capacity and the amount of nanoseconds between every connection keepalive (0 for no keepalive)

pub async fn get_conn(&self) -> RedisResult<ConnWrapper>[src]

Retrieve a connection from the pool The connection is tested before being released, if test fails a new connection is generated

Trait Implementations

impl Clone for Pool[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.