ruvio-client 0.1.0

RESP2 client for the Ruvio key-value server
Documentation
ruvio-client-0.1.0 has been yanked.

ruvio-client

Blocking RESP2 client for Ruvio. Connecting does not send CLIENT SETINFO or HELLO. One Client is one TCP connection. Methods take &mut self. Other commands go through execute with the same argument lists as redis-cli.

use std::time::Duration;
use ruvio_client::Client;

let mut db = Client::connect("127.0.0.1", 6379)?;
db.set("session:ada", "hello")?;
let value = db.get_string("session:ada")?;
db.incr("visits")?;
db.expire("session:ada", Duration::from_secs(60))?;

A password is sent as AUTH only when ClientOptions::password is set. A server error reply leaves the connection usable. A broken read or write does not.