[−][src]Crate darkredis
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()));
Structs
Command | A struct for defining commands manually. If you want pipelining, use |
CommandList | A struct for defining commands manually, which allows for pipelining of several commands. If you need
to only run one command, use |
Connection | A connection to Redis. Copying is cheap as the inner type is a simple, futures-aware, |
ConnectionPool | A connection pool. Clones are cheap and is the expected way to send the pool around your application. |
Enums
Error | The |
Value | Enum depicting the various possible responses one can get from Redis. |
Type Definitions
Result | Result type used in the whole crate. |