Crate hiredis [] [src]

Interface to Hiredis.

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),
};

Structs

Context

A context.

Error

An error.

Enums

ErrorKind

An error kind.

Reply

A reply of a command.

Traits

AsBytes

A trait for command arguments.

Functions

connect

Connect to a Redis server.

Type Definitions

Result

A result.