Crates.io | redisclient |
lib.rs | redisclient |
version | 0.1.2 |
source | src |
created_at | 2020-12-19 02:32:28.988414 |
updated_at | 2020-12-27 00:59:46.670175 |
description | Redis client for Rust |
homepage | |
repository | https://github.com/ltoddy/redis-rs |
max_upload_size | |
id | 324498 |
size | 99,126 |
Redis client for Rust.
Cargo.toml
[dependencies.redisclient]
version = "*"
src/main.rs
extern crate redisclient;
use redisclient::RedisResult;
use redisclient::RedisClient;
fn main() {
if let Err(e) = run() {
println!("Error -> {}", e);
}
}
fn run() -> RedisResult<()> {
let mut client = RedisClient::new()?;
client.mset(vec![("key1", 1), ("key2", 2)])?;
let values: Vec<String> = client.mget(vec!["key1", "key2"])?;
println!("values -> {:?}", values);
let values: Vec<isize> = client.mget(vec!["key1", "key2"])?;
println!("values -> {:?}", values);
Ok(())
}