redisclient 0.1.2

Redis client for Rust
Documentation
  • Coverage
  • 55.36%
    93 out of 168 items documented1 out of 120 items with examples
  • Size
  • Source code size: 98.74 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 4.98 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • ltoddy/redis-rs
    24 2 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • ltoddy

redis-rs

ci

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