Skip to content

ltoddy/redis-rs

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

redis-rs

ci latest version doc

Redis client for Rust.

  • Pure Rust, and doesn't depend on any 3rd party libraries

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(())
}

About

Redis client for Rust.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published