12 releases

Uses old Rust 2015

0.3.1 Nov 15, 2016
0.3.0 Jun 17, 2016
0.2.4 Nov 7, 2015
0.2.3 Jul 27, 2015
0.0.1 Jun 3, 2015

#2180 in Database interfaces


Used in mcpat

Apache-2.0/MIT

9KB
201 lines

Hiredis Version Status

The package provides an interface to Hiredis.

Documentation

Example

use hiredis::Reply;

let mut context = hiredis::connect("127.0.0.1", 6379).unwrap();

match context.command(&["SET", "greeting", "Hi, there!"]).unwrap() {
    Reply::Status(_) => {},
    _ => assert!(false),
}

match context.command(&["GET", "greeting"]).unwrap() {
    Reply::Bulk(bytes) => println!("{}", String::from_utf8(bytes).unwrap()),
    _ => assert!(false),
};

Contribution

Your contribution is highly appreciated. Do not hesitate to open an issue or a pull request. Note that any contribution submitted for inclusion in the project will be licensed according to the terms given in LICENSE.md.

Dependencies

~220KB