resp-protocol-0.0.3 has been yanked.
rust-resp-protocol
REdis Serialization Protocol
Install
add resp-protocol
to Cargo.toml
[]
= "0.0.2"
Usage
use resp_protocol;
Types
- Simple string
- Error
- Integer
- Bulk string
- Array
Simple string
Examples
Value
"+OK\r\n"
Build
use SimpleString;
let simple_string: SimpleString = new;
Parse
use SimpleString;
let string: &str = "+OK\r\n";
let simple_string: SimpleString = parse.unwrap;
Error
Examples
Value
"-ERROR\r\n"
Build
use Error;
let error: Error = new;
Parse
use Error;
let string: &str = "-ERROR\r\n";
let error: Error = parse.unwrap;
Integer
Examples
Value
":100\r\n"
Build
use Integer;
let integer: Integer = new;
Parse
use Integer;
let string: &str = ":-100\r\n";
let integer: Integer = parse.unwrap;