Crate redi_rs

source ·
Expand description

Lightweight, memory-safe and async Redis client with connection pooling

Examples

use std::str::FromStr;

use redi_rs::RedisPool;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
   let mut pool = RedisPool::from_str("localhost:6379").unwrap();

   let _ = pool.max_connections(10).establish_pool().await?;

   pool.send_command("SET foo bar").await?;

   Ok(())
}

Structs