ntex-redis

Crates.iontex-redis
lib.rsntex-redis
version2.0.0
sourcesrc
created_at2021-03-10 14:12:46.04183
updated_at2024-05-28 15:12:07.344226
descriptionRedis client
homepage
repositoryhttps://github.com/ntex-rs/ntex-redis.git
max_upload_size
id366792
size153,756
Nikolay Kim (fafhrd91)

documentation

https://docs.rs/ntex-redis

README

ntex redis build status codecov crates.io

redis client for ntex framework

Documentation & community resources

Example

use ntex_redis::{cmd, RedisConnector};

#[ntex::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let redis = RedisConnector::new("127.0.0.1:6379").connect().await?;

    // create list with one value
    redis.exec(cmd::LPush("test", "value"));

    // get value by index
    let value = redis.exec(cmd::LIndex("test", 0)).await?;
    assert_eq!(value.unwrap(), "value");

    // remove key
    redis.exec(cmd::Del("test")).await?;

    Ok(())
}

License

This project is licensed under

Commit count: 89

cargo fmt