28 releases (2 stable)

2.0.0 May 28, 2024
1.0.0 Jan 9, 2024
0.5.1 Jun 23, 2023
0.4.1 Jan 28, 2023
0.1.0 Mar 10, 2021

#704 in Network programming

Download history 27/week @ 2024-02-14 12/week @ 2024-02-21 18/week @ 2024-02-28 1/week @ 2024-03-06 5/week @ 2024-03-13 57/week @ 2024-03-27 93/week @ 2024-04-03 2/week @ 2024-05-15 101/week @ 2024-05-22 90/week @ 2024-05-29

193 downloads per month

MIT/Apache

87KB
2K SLoC

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

Dependencies

~13–45MB
~787K SLoC