Asyncronous redis client built using futures and async await, with optional connection pooling.
#![feature(async_await)] use darkredis::*; // Create a connection pool with 4 connections let pool = ConnectionPool::create("127.0.0.1:6379".into(), None, 4).await.unwrap(); let mut connection = pool.get().await; // Grab a connection from the pool connection.set("some-key", "Hello, world!").await.unwrap(); assert_eq!(connection.get("some-key").await.unwrap(), Some("Hello, world!".into()));
A struct for defining commands manually. If you want pipelining, use
A struct for defining commands manually, which allows for pipelining of several commands. If you need
to only run one command, use
A connection to Redis. Copying is cheap as the inner type is a simple, futures-aware,
A connection pool. Clones are cheap and is the expected way to send the pool around your application.
Enum depicting the various possible responses one can get from Redis.
Result type used in the whole crate.