Deadpool for Redis Latest Version

Deadpool is a dead simple async pool for connections and objects of any type.

This crate implements a deadpool manager for redis.

Example

```rust use std::env;

use deadpool_redis::{Manager, Pool}; use futures::compat::Future01CompatExt; use redis::FromRedisValue;

[tokio::main]

async fn main() { let mgr = Manager::new("redis://127.0.0.1/").unwrap(); let pool = Pool::new(mgr, 16); { let mut conn = pool.get().await.unwrap(); let mut cmd = redis::cmd("SET"); cmd.arg(&["deadpool/testkey", "42"]); conn.query(&cmd).await.unwrap(); } { let mut conn = pool.get().await.unwrap(); let mut cmd = redis::cmd("GET"); cmd.arg(&["deadpool/testkey"]); let value = conn.query(&cmd).await.unwrap(); asserteq!(String::fromredisvalue(&value).unwrap(), "42".tostring()); } } ```

License

Licensed under either of

at your option.