28个版本 (2个稳定版)
2.0.0 | 2024年5月28日 |
---|---|
1.0.0 | 2024年1月9日 |
0.5.1 | 2023年6月23日 |
0.4.1 | 2023年1月28日 |
0.1.0 | 2021年3月10日 |
#628 in 网络编程
87KB
2K SLoC
ntex redis

ntex框架的Redis客户端
文档和社区资源
- 文档
- 最低支持的Rust版本:1.65或更高
示例
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(())
}
许可证
本项目受以下许可证保护
- MIT许可证 (LICENSE 或 http://opensource.org/licenses/MIT)
依赖关系
~13–25MB
~449K SLoC