kredis

Crates.iokredis
lib.rskredis
version0.1.0
sourcesrc
created_at2022-05-02 02:37:37.997286
updated_at2022-05-02 02:37:37.997286
descriptionAn ergonomic asynchronous Redis library
homepage
repositoryhttps://github.com/KennethWilke/kredis
max_upload_size
id578826
size5,358
Kenneth Wilke (KennethWilke)

documentation

README

kRedis

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

Example

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(())
}
Commit count: 4

cargo fmt