21 releases (4 stable)
Uses old Rust 2015
1.0.3 | Aug 19, 2022 |
---|---|
1.0.2 | Apr 11, 2017 |
1.0.0 | Mar 26, 2017 |
0.4.0 | Jun 5, 2016 |
0.3.5 | Mar 27, 2016 |
#2239 in Database interfaces
59 downloads per month
Used in 5 crates
40KB
749 lines
RESP
RESP(REdis Serialization Protocol) Serialization for Rust.
Implementations:
- redis-cli redis CLI.
API
extern crate resp;
use resp::{Value, encode, encode_slice, Decoder};
RESP Values
enum Value {
/// Null bulk reply, $-1\r\n
Null,
/// Null array reply, *-1\r\n
NullArray,
/// For Simple Strings the first byte of the reply is "+"
String(String),
/// For Errors the first byte of the reply is "-"
Error(String),
/// For Integers the first byte of the reply is ":"
Integer(i64),
/// For Bulk Strings the first byte of the reply is "$"
Bulk(String),
/// For Bulk <binary> Strings the first byte of the reply is "$"
BufBulk(Vec<u8>),
/// For Arrays the first byte of the reply is "*"
Array(Vec<Value>),
}