| Crates.io | kredis |
| lib.rs | kredis |
| version | 0.1.0 |
| created_at | 2022-05-02 02:37:37.997286+00 |
| updated_at | 2022-05-02 02:37:37.997286+00 |
| description | An ergonomic asynchronous Redis library |
| homepage | |
| repository | https://github.com/KennethWilke/kredis |
| max_upload_size | |
| id | 578826 |
| size | 5,358 |
This crate aims to provide a clean and simple client library for Redis that works well in asynchronous Rust applciations.
This crate is still very new, and currently only provides very simple commands
use anyhow::Result;
use redis::Redis;
#[tokio::main]
pub async fn main() -> Result<()> {
let mut redis = Redis::connect("tcp://localhost:6379").await?;
redis.ping().await?;
redis.set(b"test", b"weee").await?;
let x: String = redis.get(b"test").await?.try_into()?;
println!("x: {}", x);
Ok(())
}